Commit 6b4f483d authored by Joseph Tannhuber's avatar Joseph Tannhuber

don't change cursor color if terminal doesn't support it

parent cbb1f8d9
############################################################################### ###############################################################################
# #
# prompt theme name: budspencer # prompt theme name: budspencer
# #
# description: a sophisticated airline/powerline theme # description: a sophisticated airline/powerline theme
# #
# author: Joseph Tannhuber # author: Joseph Tannhuber
...@@ -11,8 +11,19 @@ ...@@ -11,8 +11,19 @@
############################################################################### ###############################################################################
# Color definitions # Color definitions
############################################################################### ###############################################################################
# define colors
set -g budspencer_colors 000000 083743 445659 fdf6e3 b58900 cb4b16 dc121f af005f 6c71c4 268bd2 2aa198 859900 set -g budspencer_colors 000000 083743 445659 fdf6e3 b58900 cb4b16 dc121f af005f 6c71c4 268bd2 2aa198 859900
# cursor colors
set -g budspencer_cursors "\033]12;#$budspencer_colors[10]\007" "\033]12;#$budspencer_colors[5]\007" "\033]12;#$budspencer_colors[8]\007"
set -l unsupported_terminals "fbterm" "st" "linux" "screen"
for term in $unsupported_terminals
if test $term = $TERM
set -g budspencer_cursors "" "" ""
end
end
############################################################################### ###############################################################################
# Utils # Utils
############################################################################### ###############################################################################
...@@ -38,17 +49,17 @@ function fish_vi_prompt_cm --description "Displays the current mode" ...@@ -38,17 +49,17 @@ function fish_vi_prompt_cm --description "Displays the current mode"
switch $fish_bind_mode switch $fish_bind_mode
case default case default
set_color -b $budspencer_colors[10] $budspencer_colors[1] set_color -b $budspencer_colors[10] $budspencer_colors[1]
echo -en "\033]12;#$budspencer_colors[10]\007" echo -en $budspencer_cursors[1]
echo -n " NORMAL " echo -n " NORMAL "
set_color -b $budspencer_colors[1] $budspencer_colors[10] set_color -b $budspencer_colors[1] $budspencer_colors[10]
case insert case insert
set_color -b $budspencer_colors[5] $budspencer_colors[1] set_color -b $budspencer_colors[5] $budspencer_colors[1]
echo -en "\033]12;#$budspencer_colors[5]\007" echo -en $budspencer_cursors[2]
echo -n " INSERT " echo -n " INSERT "
set_color -b $budspencer_colors[1] $budspencer_colors[5] set_color -b $budspencer_colors[1] $budspencer_colors[5]
case visual case visual
set_color -b $budspencer_colors[8] $budspencer_colors[1] set_color -b $budspencer_colors[8] $budspencer_colors[1]
echo -en "\033]12;#$budspencer_colors[8]\007" echo -en $budspencer_cursors[3]
echo -n " VISUAL " echo -n " VISUAL "
set_color -b $budspencer_colors[1] $budspencer_colors[8] set_color -b $budspencer_colors[1] $budspencer_colors[8]
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment