dotfiles/fish/functions/tide/configure/choices/all/show_time.fish

34 lines
957 B
Fish
Raw Normal View History

2023-10-08 22:26:07 -05:00
function show_time
_tide_title 'Show current time?'
_tide_option 1 No
_tide_display_prompt
set -a fake_tide_right_prompt_items time
_tide_option 2 '24-hour format'
2023-11-20 11:20:55 -06:00
set -g fake_tide_time_format %T
_tide_display_prompt
2023-10-08 22:26:07 -05:00
_tide_option 3 '12-hour format'
2023-11-20 11:20:55 -06:00
set -g fake_tide_time_format %r
_tide_display_prompt
2023-10-08 22:26:07 -05:00
2023-11-20 11:20:55 -06:00
_tide_menu (status function)
2023-10-08 22:26:07 -05:00
switch $_tide_selected_option
2023-11-20 11:20:55 -06:00
case No
2023-10-08 22:26:07 -05:00
set -g fake_tide_time_format ''
set -e fake_tide_right_prompt_items[-1]
2023-11-20 11:20:55 -06:00
case '24-hour format'
2023-10-08 22:26:07 -05:00
set -g fake_tide_time_format %T
2023-11-20 11:20:55 -06:00
case '12-hour format'
set -g fake_tide_time_format %r
2023-10-08 22:26:07 -05:00
end
switch $_tide_configure_style
case lean
_next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height
case classic rainbow
_next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_separators
end
end