Unify prompt connection menus

This commit is contained in:
Ilan Cosman 2021-01-22 16:35:14 -08:00
parent bad52f9dbb
commit 443a3ddf7a
4 changed files with 9 additions and 27 deletions

View File

@ -1,4 +1,4 @@
function lean_prompt_connection
function prompt_connection
_tide_title 'Prompt Connection'
_tide_option 1 'Disconnected'
@ -19,5 +19,10 @@ function lean_prompt_connection
case 3
set -g fake_tide_prompt_connection_icon '─'
end
_next_choice 'all/prompt_connection_andor_frame_color'
switch $_tide_configure_style
case lean
_next_choice 'all/prompt_connection_andor_frame_color'
case classic rainbow
_next_choice 'powerline/powerline_prompt_frame'
end
end

View File

@ -17,6 +17,6 @@ function lean_prompt_height
case 2
_find_and_remove 'newline' fake_tide_left_prompt_items
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items[1..-2] 'newline' $fake_tide_left_prompt_items[-1]
_next_choice 'lean/lean_prompt_connection'
_next_choice 'all/prompt_connection'
end
end

View File

@ -1,23 +0,0 @@
function powerline_prompt_connection
_tide_title 'Prompt Connection'
_tide_option 1 'Disconnected'
_tide_display_prompt fake_tide_prompt_connection_icon ''
_tide_option 2 'Dotted'
_tide_display_prompt fake_tide_prompt_connection_icon '·'
_tide_option 3 'Solid'
_tide_display_prompt fake_tide_prompt_connection_icon '─'
_tide_menu
switch $_tide_selected_option
case 1
set -g fake_tide_prompt_connection_icon ''
case 2
set -g fake_tide_prompt_connection_icon '·'
case 3
set -g fake_tide_prompt_connection_icon '─'
end
_next_choice 'powerline/powerline_prompt_frame'
end

View File

@ -25,6 +25,6 @@ function powerline_prompt_height
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items 'newline'
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_next_choice 'powerline/powerline_prompt_connection'
_next_choice 'all/prompt_connection'
end
end