mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 20:13:05 +03:00
Add prompt_connection_andor_frame_color
This commit is contained in:
parent
33e91ef45a
commit
bf4e553c21
@ -25,7 +25,7 @@ function finish
|
||||
set -e $fakeVar
|
||||
end
|
||||
|
||||
cd .
|
||||
source "$__fish_config_dir/conf.d/_tide_Ω_run_on_startup.fish" # Reload important startup variables
|
||||
end
|
||||
|
||||
_quit
|
||||
|
@ -0,0 +1,64 @@
|
||||
function prompt_connection_andor_frame_color
|
||||
if test -n "$fake_tide_prompt_connection_icon"
|
||||
set promptConnectionExists
|
||||
end
|
||||
if test "$fake_tide_left_prompt_frame_enabled" = 'true' -o "$fake_tide_right_prompt_frame_enabled" = 'true'
|
||||
set frameExists
|
||||
end
|
||||
|
||||
if set -q promptConnectionExists && set -q frameExists
|
||||
set title "Connection & Frame Color"
|
||||
else if set -q promptConnectionExists
|
||||
set title "Connection Color"
|
||||
else if set -q frameExists
|
||||
set title "Frame Color"
|
||||
else
|
||||
_next_choice 'all/prompt_spacing'
|
||||
return 0
|
||||
end
|
||||
|
||||
_title $title
|
||||
|
||||
_option 1 'Lightest'
|
||||
_set_prompt_connection_and_frame_color 808080
|
||||
_display_prompt
|
||||
|
||||
_option 2 'Light'
|
||||
_set_prompt_connection_and_frame_color 6C6C6C
|
||||
_display_prompt
|
||||
|
||||
_option 3 'Dark'
|
||||
_set_prompt_connection_and_frame_color 585858
|
||||
_display_prompt
|
||||
|
||||
_option 4 'Darkest'
|
||||
_set_prompt_connection_and_frame_color 444444
|
||||
_display_prompt
|
||||
|
||||
_display_restart_and_quit
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/4/r/q)
|
||||
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'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
_quit
|
||||
end
|
||||
end
|
||||
|
||||
function _set_prompt_connection_and_frame_color -a color
|
||||
set -g fake_tide_prompt_connection_color $color
|
||||
set -g fake_tide_left_prompt_frame_color $color
|
||||
set -g fake_tide_right_prompt_frame_color $color
|
||||
end
|
@ -2,7 +2,7 @@ function classic_prompt_connection
|
||||
_title 'Prompt Connection'
|
||||
|
||||
_option 1 'Disconnected'
|
||||
_display_prompt fake_tide_prompt_connection_icon ' '
|
||||
_display_prompt fake_tide_prompt_connection_icon ''
|
||||
|
||||
_option 2 'Dotted'
|
||||
_display_prompt fake_tide_prompt_connection_icon '·'
|
||||
@ -14,7 +14,7 @@ function classic_prompt_connection
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/r/q)
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_icon ' '
|
||||
set -g fake_tide_prompt_connection_icon ''
|
||||
_next_choice 'classic/classic_prompt_frame'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_icon '·'
|
||||
|
@ -1,40 +0,0 @@
|
||||
function classic_prompt_connection_color
|
||||
_title 'Connection Color'
|
||||
|
||||
_option 1 'Lightest'
|
||||
set -g fake_tide_prompt_connection_color 808080
|
||||
_display_prompt
|
||||
|
||||
_option 2 'Light'
|
||||
set -g fake_tide_prompt_connection_color 6C6C6C
|
||||
_display_prompt
|
||||
|
||||
_option 3 'Dark'
|
||||
set -g fake_tide_prompt_connection_color 585858
|
||||
_display_prompt
|
||||
|
||||
_option 4 'Darkest'
|
||||
set -g fake_tide_prompt_connection_color 444444
|
||||
_display_prompt
|
||||
|
||||
_display_restart_and_quit
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/4/r/q)
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_color 808080
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_color 6C6C6C
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 3
|
||||
set -g fake_tide_prompt_connection_color 585858
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 4
|
||||
set -g fake_tide_prompt_connection_color 444444
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
_quit
|
||||
end
|
||||
end
|
@ -32,20 +32,20 @@ function classic_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 'classic/classic_prompt_connection_and_frame_color'
|
||||
_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 'classic/classic_prompt_connection_and_frame_color'
|
||||
_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 'classic/classic_prompt_connection_and_frame_color'
|
||||
_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 'classic/classic_prompt_connection_and_frame_color'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
|
@ -20,7 +20,7 @@ function classic_prompt_height
|
||||
set -e fake_tide_left_prompt_items[(contains -i '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_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)]
|
||||
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items 'newline'
|
||||
|
@ -2,7 +2,7 @@ function lean_prompt_connection
|
||||
_title 'Prompt Connection'
|
||||
|
||||
_option 1 'Disconnected'
|
||||
_display_prompt fake_tide_prompt_connection_icon ' '
|
||||
_display_prompt fake_tide_prompt_connection_icon ''
|
||||
|
||||
_option 2 'Dotted'
|
||||
_display_prompt fake_tide_prompt_connection_icon '·'
|
||||
@ -14,14 +14,14 @@ function lean_prompt_connection
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/r/q)
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_icon ' '
|
||||
_next_choice 'all/prompt_spacing'
|
||||
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 'lean/lean_prompt_connection_color'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 3
|
||||
set -g fake_tide_prompt_connection_icon '─'
|
||||
_next_choice 'lean/lean_prompt_connection_color'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
|
@ -1,36 +0,0 @@
|
||||
function lean_prompt_connection_color
|
||||
_title 'Connection Color'
|
||||
|
||||
_option 1 'Lightest'
|
||||
_display_prompt fake_tide_prompt_connection_color 808080
|
||||
|
||||
_option 2 'Light'
|
||||
_display_prompt fake_tide_prompt_connection_color 6C6C6C
|
||||
|
||||
_option 3 'Dark'
|
||||
_display_prompt fake_tide_prompt_connection_color 585858
|
||||
|
||||
_option 4 'Darkest'
|
||||
_display_prompt fake_tide_prompt_connection_color 444444
|
||||
|
||||
_display_restart_and_quit
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/4/r/q)
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_color 808080
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_color 6C6C6C
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 3
|
||||
set -g fake_tide_prompt_connection_color 585858
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case 4
|
||||
set -g fake_tide_prompt_connection_color 444444
|
||||
_next_choice 'all/prompt_spacing'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
_quit
|
||||
end
|
||||
end
|
@ -14,7 +14,7 @@ function lean_prompt_height
|
||||
switch (_menu 'Choice' 1/2/r/q)
|
||||
case 1
|
||||
set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)]
|
||||
_next_choice 'all/prompt_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set -e fake_tide_left_prompt_items[(contains -i '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]
|
||||
|
@ -14,11 +14,11 @@ function pure_prompt_height
|
||||
switch (_menu 'Choice' 1/2/r/q)
|
||||
case 1
|
||||
set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)]
|
||||
_next_choice 'all/prompt_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set -e fake_tide_left_prompt_items[(contains -i '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 'all/prompt_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
|
@ -2,7 +2,7 @@ function rainbow_prompt_connection
|
||||
_title 'Prompt Connection'
|
||||
|
||||
_option 1 'Disconnected'
|
||||
_display_prompt fake_tide_prompt_connection_icon ' '
|
||||
_display_prompt fake_tide_prompt_connection_icon ''
|
||||
|
||||
_option 2 'Dotted'
|
||||
_display_prompt fake_tide_prompt_connection_icon '·'
|
||||
@ -14,7 +14,7 @@ function rainbow_prompt_connection
|
||||
|
||||
switch (_menu 'Choice' 1/2/3/r/q)
|
||||
case 1
|
||||
set -g fake_tide_prompt_connection_icon ' '
|
||||
set -g fake_tide_prompt_connection_icon ''
|
||||
_next_choice 'rainbow/rainbow_prompt_frame'
|
||||
case 2
|
||||
set -g fake_tide_prompt_connection_icon '·'
|
||||
|
@ -32,20 +32,20 @@ function rainbow_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_spacing'
|
||||
_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_spacing'
|
||||
_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_spacing'
|
||||
_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_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case r
|
||||
_begin
|
||||
case q
|
||||
|
@ -20,7 +20,7 @@ function rainbow_prompt_height
|
||||
set -e fake_tide_left_prompt_items[(contains -i '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_spacing'
|
||||
_next_choice 'all/prompt_connection_andor_frame_color'
|
||||
case 2
|
||||
set -e fake_tide_left_prompt_items[(contains -i 'newline' $fake_tide_left_prompt_items)]
|
||||
set -g fake_tide_left_prompt_items $fake_tide_left_prompt_items 'newline'
|
||||
|
@ -33,7 +33,7 @@ _set fake_tide_right_prompt_frame_enabled true
|
||||
_set fake_tide_right_prompt_frame_color 6C6C6C
|
||||
# ---------Prompt Connection---------
|
||||
_set fake_tide_prompt_connection_color 6C6C6C
|
||||
_set fake_tide_prompt_connection_icon ' '
|
||||
_set fake_tide_prompt_connection_icon ''
|
||||
|
||||
# --------------------Prompt Items--------------------
|
||||
# ------------Prompt Char------------
|
||||
|
@ -33,7 +33,7 @@ _set fake_tide_right_prompt_frame_enabled false
|
||||
_set fake_tide_right_prompt_frame_color 6C6C6C
|
||||
# ---------Prompt Connection---------
|
||||
_set fake_tide_prompt_connection_color 6C6C6C
|
||||
_set fake_tide_prompt_connection_icon ' '
|
||||
_set fake_tide_prompt_connection_icon ''
|
||||
|
||||
# --------------------Prompt Items--------------------
|
||||
# ------------Prompt Char------------
|
||||
|
@ -33,7 +33,7 @@ _set fake_tide_right_prompt_frame_enabled false
|
||||
_set fake_tide_right_prompt_frame_color 6C6C6C
|
||||
# ---------Prompt Connection---------
|
||||
_set fake_tide_prompt_connection_color 6C6C6C
|
||||
_set fake_tide_prompt_connection_icon ' '
|
||||
_set fake_tide_prompt_connection_icon ''
|
||||
|
||||
# --------------------Prompt Items--------------------
|
||||
# ------------Prompt Char------------
|
||||
|
@ -33,7 +33,7 @@ _set fake_tide_right_prompt_frame_enabled true
|
||||
_set fake_tide_right_prompt_frame_color 6C6C6C
|
||||
# ---------Prompt Connection---------
|
||||
_set fake_tide_prompt_connection_color 6C6C6C
|
||||
_set fake_tide_prompt_connection_icon ' '
|
||||
_set fake_tide_prompt_connection_icon ''
|
||||
|
||||
# --------------------Prompt Items--------------------
|
||||
# ------------Prompt Char------------
|
||||
|
@ -26,19 +26,19 @@ function _begin
|
||||
end
|
||||
|
||||
function _set_defaults
|
||||
if test $fake_lines -ge 26
|
||||
set -g fake_tide_print_newline_before_prompt true
|
||||
else
|
||||
set -g fake_tide_print_newline_before_prompt false
|
||||
end
|
||||
# if test $fake_lines -ge 26
|
||||
# set -g fake_tide_print_newline_before_prompt true
|
||||
# else
|
||||
# set -g fake_tide_print_newline_before_prompt false
|
||||
# end
|
||||
|
||||
set -g fake_tide_left_prompt_items 'pwd' 'git_prompt' 'newline' 'prompt_char'
|
||||
set -g fake_tide_right_prompt_items 'cmd_duration' 'time'
|
||||
# set -g fake_tide_left_prompt_items 'pwd' 'git_prompt' 'newline' 'prompt_char'
|
||||
# set -g fake_tide_right_prompt_items 'cmd_duration' 'time'
|
||||
|
||||
set -g fake_tide_time_format ''
|
||||
set -g fake_tide_time_color 5F8787
|
||||
set -g fake_tide_prompt_connection_icon ' '
|
||||
set -g fake_tide_prompt_connection_color 6C6C6C
|
||||
# set -g fake_tide_time_format ''
|
||||
# set -g fake_tide_time_color 5F8787
|
||||
# set -g fake_tide_prompt_connection_icon ''
|
||||
# set -g fake_tide_prompt_connection_color 6C6C6C
|
||||
end
|
||||
|
||||
function _next_choice -a nextChoice
|
||||
|
Loading…
Reference in New Issue
Block a user