summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/tide/configure/choices/all/show_time.fish
blob: b66c785212e8222d09e502d006b410e92c09f9f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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'
    set -g fake_tide_time_format %T
    _tide_display_prompt

    _tide_option 3 '12-hour format'
    set -g fake_tide_time_format %r
    _tide_display_prompt

    _tide_menu (status function)
    switch $_tide_selected_option
        case No
            set -g fake_tide_time_format ''
            set -e fake_tide_right_prompt_items[-1]
        case '24-hour format'
            set -g fake_tide_time_format %T
        case '12-hour format'
            set -g fake_tide_time_format %r
    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