mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-24 04:23:30 +03:00
Simplify menus code
This commit is contained in:
parent
f8f777bc19
commit
bad52f9dbb
@ -12,10 +12,8 @@ function icons
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
_disable_icons
|
||||
_next_choice 'all/finish'
|
||||
case 2
|
||||
_next_choice 'all/finish'
|
||||
end
|
||||
_next_choice 'all/finish'
|
||||
end
|
||||
|
||||
function _enable_icons
|
||||
|
@ -39,17 +39,14 @@ function prompt_connection_andor_frame_color
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
_set_prompt_connection_and_frame_color 808080
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 2
|
||||
_set_prompt_connection_and_frame_color 6C6C6C
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 3
|
||||
_set_prompt_connection_and_frame_color 585858
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 4
|
||||
_set_prompt_connection_and_frame_color 444444
|
||||
_next_choice 'all/prompt_spacing'
|
||||
end
|
||||
_next_choice 'all/prompt_spacing'
|
||||
end
|
||||
|
||||
function _set_prompt_connection_and_frame_color -a color
|
||||
|
@ -14,9 +14,8 @@ function prompt_spacing
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
set -g fake_tide_print_newline_before_prompt false
|
||||
_next_choice 'all/icons'
|
||||
case 2
|
||||
set -g fake_tide_print_newline_before_prompt true
|
||||
_next_choice 'all/icons'
|
||||
end
|
||||
_next_choice 'all/icons'
|
||||
end
|
@ -17,17 +17,11 @@ function show_time
|
||||
case 1
|
||||
set -g fake_tide_time_format ''
|
||||
set -e fake_tide_right_prompt_items[-1]
|
||||
_show_time_next_choice
|
||||
case 2
|
||||
set -g fake_tide_time_format '%T'
|
||||
_show_time_next_choice
|
||||
case 3
|
||||
set -g fake_tide_time_format '%r'
|
||||
_show_time_next_choice
|
||||
end
|
||||
end
|
||||
|
||||
function _show_time_next_choice
|
||||
switch $_tide_configure_style
|
||||
case lean
|
||||
_next_choice "$_tide_configure_style"/"$_tide_configure_style"_prompt_height
|
||||
|
@ -21,17 +21,14 @@ function classic_prompt_color
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
_set_all_items_bg_color 585858
|
||||
_next_choice 'all/show_time'
|
||||
case 2
|
||||
_set_all_items_bg_color 444444
|
||||
_next_choice 'all/show_time'
|
||||
case 3
|
||||
_set_all_items_bg_color 303030
|
||||
_next_choice 'all/show_time'
|
||||
case 4
|
||||
_set_all_items_bg_color 1C1C1C
|
||||
_next_choice 'all/show_time'
|
||||
end
|
||||
_next_choice 'all/show_time'
|
||||
end
|
||||
|
||||
function _set_all_items_bg_color -a color
|
||||
|
@ -26,18 +26,15 @@ function classic_prompt_separators
|
||||
case 1
|
||||
set -g fake_tide_left_prompt_item_separator_same_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_same_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 2
|
||||
set -g fake_tide_left_prompt_item_separator_same_color '│'
|
||||
set -g fake_tide_right_prompt_item_separator_same_color '│'
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 3
|
||||
set -g fake_tide_left_prompt_item_separator_same_color '╱'
|
||||
set -g fake_tide_right_prompt_item_separator_same_color '╱'
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 4
|
||||
set -g fake_tide_left_prompt_item_separator_same_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_same_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
end
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
end
|
@ -14,12 +14,10 @@ function lean_prompt_connection
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_icon ''
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_icon '·'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 3
|
||||
set -g fake_tide_prompt_connection_icon '─'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
end
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
end
|
@ -14,12 +14,10 @@ function powerline_prompt_connection
|
||||
switch $_tide_selected_option
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_icon ''
|
||||
_next_choice 'powerline/powerline_prompt_frame'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_icon '·'
|
||||
_next_choice 'powerline/powerline_prompt_frame'
|
||||
case 3
|
||||
set -g fake_tide_prompt_connection_icon '─'
|
||||
_next_choice 'powerline/powerline_prompt_frame'
|
||||
end
|
||||
_next_choice 'powerline/powerline_prompt_frame'
|
||||
end
|
@ -31,19 +31,16 @@ function powerline_prompt_frame
|
||||
set fake_tide_left_prompt_frame_enabled false
|
||||
set fake_tide_right_prompt_frame_enabled false
|
||||
set -a fake_tide_left_prompt_items prompt_char
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set fake_tide_left_prompt_frame_enabled true
|
||||
set fake_tide_right_prompt_frame_enabled false
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 3
|
||||
set fake_tide_left_prompt_frame_enabled false
|
||||
set fake_tide_right_prompt_frame_enabled true
|
||||
set -a fake_tide_left_prompt_items prompt_char
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 4
|
||||
set fake_tide_left_prompt_frame_enabled true
|
||||
set fake_tide_right_prompt_frame_enabled true
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
end
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
end
|
@ -26,18 +26,15 @@ function powerline_prompt_heads
|
||||
case 1
|
||||
set -g fake_tide_left_prompt_suffix ''
|
||||
set -g fake_tide_right_prompt_prefix ''
|
||||
_next_choice 'powerline/powerline_prompt_tails'
|
||||
case 2
|
||||
set -g fake_tide_left_prompt_suffix '▓▒░'
|
||||
set -g fake_tide_right_prompt_prefix '░▒▓'
|
||||
_next_choice 'powerline/powerline_prompt_tails'
|
||||
case 3
|
||||
set -g fake_tide_left_prompt_suffix ''
|
||||
set -g fake_tide_right_prompt_prefix ''
|
||||
_next_choice 'powerline/powerline_prompt_tails'
|
||||
case 4
|
||||
set -g fake_tide_left_prompt_suffix ''
|
||||
set -g fake_tide_right_prompt_prefix ''
|
||||
_next_choice 'powerline/powerline_prompt_tails'
|
||||
end
|
||||
_next_choice 'powerline/powerline_prompt_tails'
|
||||
end
|
@ -31,22 +31,18 @@ function powerline_prompt_tails
|
||||
case 1
|
||||
set -g fake_tide_left_prompt_prefix ''
|
||||
set -g fake_tide_right_prompt_suffix ''
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
case 2
|
||||
set -g fake_tide_left_prompt_prefix '░▒▓'
|
||||
set -g fake_tide_right_prompt_suffix '▓▒░'
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
case 3
|
||||
set -g fake_tide_left_prompt_prefix ''
|
||||
set -g fake_tide_right_prompt_suffix ''
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
case 4
|
||||
set -g fake_tide_left_prompt_prefix ''
|
||||
set -g fake_tide_right_prompt_suffix ''
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
case 5
|
||||
set -g fake_tide_left_prompt_prefix ''
|
||||
set -g fake_tide_right_prompt_suffix ''
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
end
|
||||
_next_choice 'powerline/powerline_prompt_height'
|
||||
end
|
@ -26,18 +26,15 @@ function rainbow_prompt_separators
|
||||
case 1
|
||||
set -g fake_tide_left_prompt_item_separator_diff_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_diff_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 2
|
||||
set -g fake_tide_left_prompt_item_separator_diff_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_diff_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 3
|
||||
set -g fake_tide_left_prompt_item_separator_diff_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_diff_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
case 4
|
||||
set -g fake_tide_left_prompt_item_separator_diff_color ''
|
||||
set -g fake_tide_right_prompt_item_separator_diff_color ''
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
end
|
||||
_next_choice 'powerline/powerline_prompt_heads'
|
||||
end
|
Loading…
Reference in New Issue
Block a user