Skip to content

Commit

Permalink
feat: time icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco-Veio committed Feb 4, 2024
1 parent fbca958 commit f2c2659
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion functions/_tide_item_time.fish
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function _tide_item_time
_tide_print_item time (date +$tide_time_format)
_tide_print_item time $tide_time_icon' ' (date +$tide_time_format)
end
1 change: 1 addition & 0 deletions functions/tide/configure/icons.fish
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tide_status_icon βœ”
tide_status_icon_failure ✘
tide_terraform_icon 󱁒
tide_toolbox_icon 
tide_time_icon ο€—
tide_vi_mode_icon_default D
tide_vi_mode_icon_insert I
tide_vi_mode_icon_replace R
Expand Down
13 changes: 13 additions & 0 deletions tests/_tide_item_time.test.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ function _time -a format
LC_TIME=en_US.UTF-8 _tide_decolor (tide_time_format="$format" _tide_item_time)
end

set -lx tide_time_icon =

# None
_time '' # CHECK:

Expand All @@ -13,3 +15,14 @@ _time %T # CHECK: {{\d\d:\d\d:\d\d}}

# 12 Hour
_time %r # CHECK: {{\d\d:\d\d:\d\d (A|P)M}}

set -lx tide_time_icon = ο€—

# Only Icon
_time '' # CHECK: ο€—

# 24 Hour With Icon
_time %T # CHECK: ο€— {{\d\d:\d\d:\d\d}}

# 12 Hour With Icon
_time %r # CHECK: ο€— {{\d\d:\d\d:\d\d (A|P)M}}

0 comments on commit f2c2659

Please sign in to comment.