Update fisher & tide, add VS Code, i3, & sway configs

This commit is contained in:
askiiart 2023-11-20 01:07:05 -06:00
parent 9a43cae5fa
commit 80f43e8f7e
Signed by untrusted user who does not match committer: askiiart
GPG key ID: BC3800E55FB54D67
62 changed files with 453 additions and 616 deletions

View file

@ -1,30 +1,21 @@
function finish
_tide_title Finish
echo
set_color red
_tide_option y 'Overwrite your current tide config'
_tide_title 'Overwrite tide config?'
set_color normal
_tide_option y Yes
echo
_tide_option p 'Exit and print the config you just generated'
echo
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case 'Overwrite your current tide config'
case y
_tide_finish
command -q clear && clear
set -q _flag_auto || _tide_print_configure_current_options
case 'Exit and print the config you just generated'
_tide_exit_configure
command -q clear && clear
_tide_print_configure_current_options
end
end
function _tide_finish
_tide_exit_configure
set -e _tide_selected_option # Skip through all the _next_choices
# Deal with prompt char/vi mode
contains character $fake_tide_left_prompt_items || set -p fake_tide_left_prompt_items vi_mode
@ -38,9 +29,5 @@ function _tide_finish
set -e $_tide_prompt_var 2>/dev/null
# Re-initialize the prompt
tide reload
end
function _tide_print_configure_current_options
_tide_fish_colorize "tide configure --auto $_tide_configure_current_options"
source (functions --details fish_prompt)
end

View file

@ -8,12 +8,12 @@ function icons
_enable_icons
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case 'Few icons'
case 1
_disable_icons
end
_next_choice all/transient
_next_choice all/finish
end
function _enable_icons

View file

@ -9,9 +9,9 @@ function prompt_colors
set -g _tide_16color true
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case 'True color'
case 1
_load_config "$_tide_configure_style"
set -e _tide_16color
switch $_tide_configure_style
@ -20,7 +20,7 @@ function prompt_colors
case classic
_next_choice classic/classic_prompt_color
end
case '16 colors'
case 2
_next_choice all/show_time
end
end

View file

@ -2,30 +2,27 @@ function prompt_connection
_tide_title 'Prompt Connection'
_tide_option 1 Disconnected
set -g fake_tide_prompt_icon_connection ' '
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_icon_connection ' '
_tide_option 2 Dotted
set -g fake_tide_prompt_icon_connection '·'
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_icon_connection '·'
_tide_option 3 Solid
set -g fake_tide_prompt_icon_connection '─'
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_icon_connection '─'
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Disconnected
case 1
set -g fake_tide_prompt_icon_connection ' '
case Dotted
case 2
set -g fake_tide_prompt_icon_connection '·'
case Solid
case 3
set -g fake_tide_prompt_icon_connection '─'
end
switch $_tide_configure_style
case lean
_next_choice all/prompt_connection_andor_frame_color
case classic rainbow
_next_choice powerline/powerline_right_prompt_frame
_next_choice powerline/powerline_prompt_frame
end
end

View file

@ -10,30 +10,26 @@ function prompt_connection_andor_frame_color
_tide_title "Connection & Frame Color"
_tide_option 1 Lightest
set -g fake_tide_prompt_color_frame_and_connection 808080
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 808080
_tide_option 2 Light
set -g fake_tide_prompt_color_frame_and_connection 6C6C6C
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 6C6C6C
_tide_option 3 Dark
set -g fake_tide_prompt_color_frame_and_connection 585858
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 585858
_tide_option 4 Darkest
set -g fake_tide_prompt_color_frame_and_connection 444444
_tide_display_prompt
_tide_display_prompt fake_tide_prompt_color_frame_and_connection 444444
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Lightest
case 1
set -g fake_tide_prompt_color_frame_and_connection 808080
case Light
case 2
set -g fake_tide_prompt_color_frame_and_connection 6C6C6C
case Dark
case 3
set -g fake_tide_prompt_color_frame_and_connection 585858
case Darkest
case 4
set -g fake_tide_prompt_color_frame_and_connection 444444
end
_next_choice all/prompt_spacing

View file

@ -2,20 +2,19 @@ function prompt_spacing
_tide_title 'Prompt Spacing'
_tide_option 1 Compact
set -g fake_tide_prompt_add_newline_before false
_tide_display_prompt
printf \e\[1A # Move cursor up 1 row
_tide_display_prompt
_tide_option 2 Sparse
set -g fake_tide_prompt_add_newline_before true
_tide_display_prompt
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Compact
case 1
set -g fake_tide_prompt_add_newline_before false
case Sparse
case 2
set -g fake_tide_prompt_add_newline_before true
end
_next_choice all/icons

View file

@ -7,22 +7,20 @@ function show_time
set -a fake_tide_right_prompt_items time
_tide_option 2 '24-hour format'
set -g fake_tide_time_format %T
_tide_display_prompt
_tide_display_prompt fake_tide_time_format %T
_tide_option 3 '12-hour format'
set -g fake_tide_time_format %r
_tide_display_prompt
_tide_display_prompt fake_tide_time_format '%r'
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case No
case 1
set -g fake_tide_time_format ''
set -e fake_tide_right_prompt_items[-1]
case '24-hour format'
case 2
set -g fake_tide_time_format %T
case '12-hour format'
set -g fake_tide_time_format %r
case 3
set -g fake_tide_time_format '%r'
end
switch $_tide_configure_style
case lean

View file

@ -1,6 +1,4 @@
function style
set -g _tide_configure_current_options
_tide_title 'Prompt Style'
_tide_option 1 Lean
@ -15,15 +13,15 @@ function style
_load_config rainbow
_tide_display_prompt
_tide_menu (status function) --no-restart
_tide_style_menu
switch $_tide_selected_option
case Lean
case 1
_load_config lean
set -g _tide_configure_style lean
case Classic
case 2
_load_config classic
set -g _tide_configure_style classic
case Rainbow
case 3
_load_config rainbow
set -g _tide_configure_style rainbow
end
@ -31,6 +29,29 @@ function style
end
function _load_config -a name
string replace -r '^' 'set -g fake_' <(status dirname)/../../icons.fish | source
string replace -r '^' 'set -g fake_' <(status dirname)/../../configs/$name.fish | source
end
function _tide_style_menu # Exactly like _tide_menu except that it doesn't have (r) option
set -l list_with_slashes (string join '/' $_tide_option_list)
echo '(q) Quit and do nothing'\n
while true
set_color -o
read --nchars 1 --prompt-str "Choice [$list_with_slashes/q] " input
set_color normal
switch $input
case q
set -e _tide_selected_option # Skip through all the _next_choices
set -e _tide_option_list
command -q clear && clear
break
case $_tide_option_list
set -e _tide_option_list
set -g _tide_selected_option $input
break
end
end
end

View file

@ -1,22 +0,0 @@
function transient
_tide_title 'Enable transient prompt?'
_tide_option 1 No
_tide_display_prompt
_tide_display_prompt
_tide_display_prompt
_tide_option 2 Yes
_configure_transient= _tide_display_prompt
_configure_transient= _tide_display_prompt
_tide_display_prompt
_tide_menu (status function)
switch $_tide_selected_option
case No
set fake_tide_prompt_transient_enabled false
case Yes
set fake_tide_prompt_transient_enabled true
end
_next_choice all/finish
end

View file

@ -17,15 +17,15 @@ function classic_prompt_color
_set_all_items_bg_color 1C1C1C
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Lightest
case 1
_set_all_items_bg_color 585858
case Light
case 2
_set_all_items_bg_color 444444
case Dark
case 3
_set_all_items_bg_color 303030
case Darkest
case 4
_set_all_items_bg_color 1C1C1C
end
_next_choice all/show_time

View file

@ -7,34 +7,34 @@ function classic_prompt_separators
_tide_display_prompt
_tide_option 2 Vertical
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
set -g fake_tide_left_prompt_separator_same_color '│'
set -g fake_tide_right_prompt_separator_same_color '│'
_tide_display_prompt
_tide_option 3 Slanted
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
_tide_display_prompt
_tide_option 4 Round
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Angled
case 1
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
case Vertical
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
case Slanted
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
case Round
set -g fake_tide_left_prompt_separator_same_color
set -g fake_tide_right_prompt_separator_same_color
case 2
set -g fake_tide_left_prompt_separator_same_color '│'
set -g fake_tide_right_prompt_separator_same_color '│'
case 3
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
case 4
set -g fake_tide_left_prompt_separator_same_color ''
set -g fake_tide_right_prompt_separator_same_color ''
end
_next_choice powerline/powerline_prompt_heads
end

View file

@ -11,13 +11,13 @@ function lean_prompt_height
set -g fake_tide_left_prompt_suffix ' '
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case 'One line'
case 1
_tide_find_and_remove newline fake_tide_left_prompt_items
set fake_tide_left_prompt_suffix ''
_next_choice all/prompt_connection_andor_frame_color
case 'Two lines'
case 2
_tide_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]
set -g fake_tide_left_prompt_suffix ' '

View file

@ -0,0 +1,46 @@
function powerline_prompt_frame
_tide_title 'Prompt Frame'
_tide_option 1 'No frame'
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 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
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case 1
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 2
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled false
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 character
case 4
set fake_tide_left_prompt_frame_enabled true
set fake_tide_right_prompt_frame_enabled true
end
_next_choice all/prompt_connection_andor_frame_color
end

View file

@ -6,27 +6,35 @@ function powerline_prompt_heads
set -g fake_tide_right_prompt_prefix
_tide_display_prompt
_tide_option 2 Slanted
set -g fake_tide_left_prompt_suffix
set -g fake_tide_right_prompt_prefix
_tide_option 2 Blurred
set -g fake_tide_left_prompt_suffix '▓▒░'
set -g fake_tide_right_prompt_prefix '░▒▓'
_tide_display_prompt
_tide_option 3 Round
set -g fake_tide_left_prompt_suffix
set -g fake_tide_right_prompt_prefix
_tide_option 3 Slanted
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_menu (status function)
_tide_option 4 Round
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
_tide_display_prompt
_tide_menu
switch $_tide_selected_option
case Sharp
case 1
set -g fake_tide_left_prompt_suffix
set -g fake_tide_right_prompt_prefix
case Slanted
set -g fake_tide_left_prompt_suffix
set -g fake_tide_right_prompt_prefix
case Round
set -g fake_tide_left_prompt_suffix
set -g fake_tide_right_prompt_prefix
case 2
set -g fake_tide_left_prompt_suffix '▓▒░'
set -g fake_tide_right_prompt_prefix '░▒▓'
case 3
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
case 4
set -g fake_tide_left_prompt_suffix ''
set -g fake_tide_right_prompt_prefix ''
end
_next_choice powerline/powerline_prompt_tails
end

View file

@ -0,0 +1,30 @@
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
switch $_tide_selected_option
case 1
_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 2
_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,51 +0,0 @@
function powerline_prompt_style
_tide_title 'Powerline Prompt Style'
_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
_tide_display_prompt
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 true
_tide_display_prompt
_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 '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
_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 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
end

View file

@ -6,35 +6,43 @@ function powerline_prompt_tails
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 2 Sharp
_tide_option 2 Blurred
set -g fake_tide_left_prompt_prefix '░▒▓'
set -g fake_tide_right_prompt_suffix '▓▒░'
_tide_display_prompt
_tide_option 3 Sharp
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
_tide_display_prompt
_tide_option 3 Slanted
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
_tide_option 4 Slanted
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_option 4 Round
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
_tide_option 5 Round
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Flat
case 1
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
case Sharp
case 2
set -g fake_tide_left_prompt_prefix '░▒▓'
set -g fake_tide_right_prompt_suffix '▓▒░'
case 3
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
case Slanted
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
case Round
set -g fake_tide_left_prompt_prefix
set -g fake_tide_right_prompt_suffix
case 4
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
case 5
set -g fake_tide_left_prompt_prefix ''
set -g fake_tide_right_prompt_suffix ''
end
_next_choice powerline/powerline_prompt_style
_next_choice powerline/powerline_prompt_height
end

View file

@ -1,20 +0,0 @@
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

View file

@ -21,18 +21,18 @@ function rainbow_prompt_separators
set -g fake_tide_right_prompt_separator_diff_color ''
_tide_display_prompt
_tide_menu (status function)
_tide_menu
switch $_tide_selected_option
case Angled
case 1
set -g fake_tide_left_prompt_separator_diff_color
set -g fake_tide_right_prompt_separator_diff_color
case Vertical
case 2
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
case Slanted
case 3
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
case Round
case 4
set -g fake_tide_left_prompt_separator_diff_color ''
set -g fake_tide_right_prompt_separator_diff_color ''
end