Add frame and character powerline option

This commit is contained in:
Ilan Cosman 2023-09-23 20:50:28 -07:00
parent d7ca88d48e
commit 115a45f0f2
6 changed files with 57 additions and 62 deletions

View File

@ -27,16 +27,16 @@ classic_prompt_separators --> powerline_prompt_heads
rainbow_prompt_separators --> powerline_prompt_heads
powerline_prompt_heads --> powerline_prompt_tails
powerline_prompt_tails --> powerline_prompt_height
powerline_prompt_tails --> powerline_prompt_style
powerline_prompt_height -- "One Line" --> prompt_connection_andor_frame_color
powerline_prompt_height -- "Two Line" --> prompt_connection
powerline_prompt_style -- "One Line" --> prompt_connection_andor_frame_color
powerline_prompt_style -- "Two Line" --> prompt_connection
prompt_connection -- "lean" --> prompt_connection_andor_frame_color
prompt_connection -- "classic" --> powerline_prompt_frame
prompt_connection -- "rainbow" --> powerline_prompt_frame
prompt_connection -- "classic" --> powerline_prompt_right_frame
prompt_connection -- "rainbow" --> powerline_prompt_right_frame
powerline_prompt_frame --> prompt_connection_andor_frame_color
powerline_prompt_right_frame --> prompt_connection_andor_frame_color
prompt_connection_andor_frame_color --> prompt_spacing

View File

@ -26,6 +26,6 @@ function prompt_connection
case lean
_next_choice all/prompt_connection_andor_frame_color
case classic rainbow
_next_choice powerline/powerline_prompt_frame
_next_choice powerline/powerline_right_prompt_frame
end
end

View File

@ -1,30 +0,0 @@
function powerline_prompt_height
_tide_title 'Prompt Height'
_tide_option 1 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 2 'Two lines'
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
_tide_display_prompt
_tide_menu (status function)
switch $_tide_selected_option
case 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_next_choice all/prompt_connection_andor_frame_color
case 'Two lines'
_tide_find_and_remove newline fake_tide_left_prompt_items
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 all/prompt_connection
end
end

View File

@ -1,46 +1,51 @@
function powerline_prompt_frame
_tide_title 'Prompt Frame'
function powerline_prompt_style
_tide_title 'Powerline Prompt Style'
_tide_option 1 'No frame'
_tide_option 1 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
_tide_find_and_remove character fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
set -a fake_tide_left_prompt_items character
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 2 Left
set -a fake_tide_left_prompt_items newline
_tide_option 2 'Two lines, character'
set -a fake_tide_left_prompt_items character
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 3 'Two lines, frame'
_tide_find_and_remove character fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 3 Right
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled true
set -a fake_tide_left_prompt_items character
_tide_display_prompt
set -e fake_tide_left_prompt_items[-1]
_tide_option 4 Full
_tide_option 4 'Two lines, character and frame'
set -a fake_tide_left_prompt_items character
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
_tide_menu (status function)
switch $_tide_selected_option
case 'No frame'
case 'One line'
_tide_find_and_remove newline fake_tide_left_prompt_items
_tide_find_and_remove character fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled false
set -a fake_tide_left_prompt_items character
case Left
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
case Right
_next_choice all/prompt_connection_andor_frame_color
case 'Two lines, character'
set fake_tide_left_prompt_frame_enabled false
set fake_tide_right_prompt_frame_enabled true
set -a fake_tide_left_prompt_items character
case Full
set fake_tide_right_prompt_frame_enabled false
_next_choice all/prompt_connection
case 'Two lines, frame'
_tide_find_and_remove character fake_tide_left_prompt_items
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_next_choice all/prompt_connection
case 'Two lines, character and frame'
_next_choice all/prompt_connection
end
_next_choice all/prompt_connection_andor_frame_color
end

View File

@ -36,5 +36,5 @@ function powerline_prompt_tails
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
end
_next_choice powerline/powerline_prompt_height
_next_choice powerline/powerline_prompt_style
end

View File

@ -0,0 +1,20 @@
function powerline_right_prompt_frame
_tide_title 'Right Prompt Frame'
_tide_option 1 No
set fake_tide_right_prompt_frame_enabled false
_tide_display_prompt
_tide_option 2 Yes
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
_tide_menu (status function)
switch $_tide_selected_option
case No
set fake_tide_right_prompt_frame_enabled false
case Yes
set fake_tide_right_prompt_frame_enabled true
end
_next_choice all/prompt_connection_andor_frame_color
end