diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 9284d06b..12d505b4 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -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 diff --git a/functions/tide/configure/choices/all/prompt_connection.fish b/functions/tide/configure/choices/all/prompt_connection.fish index 97ed4407..ff765467 100644 --- a/functions/tide/configure/choices/all/prompt_connection.fish +++ b/functions/tide/configure/choices/all/prompt_connection.fish @@ -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 diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_height.fish b/functions/tide/configure/choices/powerline/powerline_prompt_height.fish deleted file mode 100644 index c7354988..00000000 --- a/functions/tide/configure/choices/powerline/powerline_prompt_height.fish +++ /dev/null @@ -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 diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish b/functions/tide/configure/choices/powerline/powerline_prompt_style.fish similarity index 50% rename from functions/tide/configure/choices/powerline/powerline_prompt_frame.fish rename to functions/tide/configure/choices/powerline/powerline_prompt_style.fish index eff22625..b3747579 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_frame.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_style.fish @@ -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 fake_tide_left_prompt_frame_enabled true + 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 Right - set fake_tide_left_prompt_frame_enabled false + _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 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 diff --git a/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish b/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish index d77ecf02..6b1574b8 100644 --- a/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish +++ b/functions/tide/configure/choices/powerline/powerline_prompt_tails.fish @@ -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 diff --git a/functions/tide/configure/choices/powerline/powerline_right_prompt_frame.fish b/functions/tide/configure/choices/powerline/powerline_right_prompt_frame.fish new file mode 100644 index 00000000..a2d0a5b5 --- /dev/null +++ b/functions/tide/configure/choices/powerline/powerline_right_prompt_frame.fish @@ -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