Add nix prompt, glyph, and colors

pull/206/head
Duke Jones 5 years ago
parent 3b2e847fcc
commit 50b9da5081

@ -801,6 +801,20 @@ function __bobthefish_prompt_desk -S -d 'Display current desk environment'
set_color normal
end
function __bobthefish_prompt_nix -S -d 'Display current nix environment'
[ "$theme_display_nix" = 'no' -o -z "$IN_NIX_SHELL" ]
and return
if [ "$IN_NIX_SHELL" = "impure" ]
set say_what "nix"
else
set say_what "pure"
end
__bobthefish_start_segment $color_nix
echo -ns $nix_glyph' ' "$say_what" ' '
set_color normal
end
# ==============================
# VCS segments
@ -1000,6 +1014,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
__bobthefish_prompt_user
# Virtual environments
__bobthefish_prompt_nix
__bobthefish_prompt_desk
__bobthefish_prompt_rubies
__bobthefish_prompt_virtualfish

@ -33,6 +33,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish brblue $colorfg --bold
set -x color_virtualgo brblue $colorfg --bold
set -x color_desk brblue $colorfg --bold
set -x color_nix brblue $colorfg --bold
case 'terminal-light*'
set -l colorfg white
@ -63,6 +64,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish brblue $colorfg --bold
set -x color_virtualgo brblue $colorfg --bold
set -x color_desk brblue $colorfg --bold
set -x color_nix brblue $colorfg --bold
case 'terminal2' 'terminal2-dark*'
set -l colorfg black
@ -93,6 +95,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish brblue $colorfg --bold
set -x color_virtualgo brblue $colorfg --bold
set -x color_desk brblue $colorfg --bold
set -x color_nix brblue $colorfg --bold
case 'terminal2-light*'
set -l colorfg white
@ -123,6 +126,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish brblue $colorfg --bold
set -x color_virtualgo brblue $colorfg --bold
set -x color_desk brblue $colorfg --bold
set -x color_nix brblue $colorfg --bold
case 'zenburn'
set -l grey 333333 # a bit darker than normal zenburn grey
@ -159,6 +163,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $blue $grey --bold
set -x color_virtualgo $blue $grey --bold
set -x color_desk $blue $grey --bold
set -x color_nix $blue $grey --bold
case 'base16-light'
set -l base00 181818
@ -206,6 +211,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $base0D $colorfg --bold
set -x color_virtualgo $base0D $colorfg --bold
set -x color_desk $base0D $colorfg --bold
set -x color_nix $base0D $colorfg --bold
case 'base16' 'base16-dark'
set -l base00 181818
@ -253,6 +259,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $base0D $colorfg --bold
set -x color_virtualgo $base0D $colorfg --bold
set -x color_desk $base0D $colorfg --bold
set -x color_nix $base0D $colorfg --bold
case 'solarized-light'
set -l base03 002b36
@ -300,6 +307,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $cyan $colorfg --bold
set -x color_virtualgo $cyan $colorfg --bold
set -x color_desk $cyan $colorfg --bold
set -x color_nix $cyan $colorfg --bold
case 'solarized' 'solarized-dark'
set -l base03 002b36
@ -347,6 +355,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $cyan $colorfg --bold
set -x color_virtualgo $cyan $colorfg --bold
set -x color_desk $cyan $colorfg --bold
set -x color_nix $cyan $colorfg --bold
case 'light'
# light medium dark
@ -387,6 +396,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $blue[2] $grey[1] --bold
set -x color_virtualgo $blue[2] $grey[1] --bold
set -x color_desk $blue[2] $grey[1] --bold
set -x color_nix $blue[2] $grey[1] --bold
case 'gruvbox'
# light medium dark darkest
@ -426,6 +436,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $blue[2] $fg[2] --bold
set -x color_virtualgo $blue[2] $fg[2] --bold
set -x color_desk $blue[2] $fg[2] --bold
set -x color_nix $blue[2] $fg[2] --bold
case 'dracula' # https://draculatheme.com
set -l bg 282a36
@ -467,6 +478,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $comment $bg --bold
set -x color_virtualgo $cyan $bg --bold
set -x color_desk $comment $bg --bold
set -x color_nix $cyan $bg --bold
case '*' # default dark theme
# light medium dark
@ -508,6 +520,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe
set -x color_virtualfish $blue[2] $grey[1] --bold
set -x color_virtualgo $go_blue $black --bold
set -x color_desk $blue[2] $grey[1] --bold
set -x color_nix $blue[2] $grey[1] --bold
end
end
@ -533,6 +546,7 @@ function __bobthefish_user_color_scheme_deprecated
set -q __color_virtualfish; or set -l __color_virtualfish 005faf cccccc --bold
set -q __color_virtualgo; or set -l __color_virtualgo 005faf cccccc --bold
set -q __color_desk; or set -l __color_desk 005faf cccccc --bold
set -q __color_nix; or set -l __color_nix 005faf cccccc --bold
set_color black -b red --bold
echo "The 'user' color scheme is deprecated."
@ -569,6 +583,7 @@ function __bobthefish_user_color_scheme_deprecated
set -x color_virtualfish $__color_virtualfish
set -x color_virtualgo $__color_virtualgo
set -x color_desk $__color_desk
set -x color_nix $__color_nix
end"
echo

@ -21,6 +21,7 @@ function __bobthefish_glyphs -S -d 'Define glyphs used by bobthefish'
set -x ruby_glyph ''
set -x go_glyph ''
set -x nix_glyph ''
# Desk glyphs
set -x desk_glyph \u25F2
@ -59,6 +60,7 @@ function __bobthefish_glyphs -S -d 'Define glyphs used by bobthefish'
set detached_glyph \uF417
set tag_glyph \uF412
set nix_glyph \uF313 # nf-linux-nixos
set virtualenv_glyph \uE73C ' '
set ruby_glyph \uE791 ' '
set go_glyph \uE626 ' '

Loading…
Cancel
Save