Skip to content

Commit

Permalink
Add frame and character powerline option
Browse files Browse the repository at this point in the history
  • Loading branch information
IlanCosman committed Sep 24, 2023
1 parent d7ca88d commit 115a45f
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 60 deletions.
12 changes: 6 additions & 6 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 115a45f

Please sign in to comment.