mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2025-06-13 13:03:54 +00:00
Merge 05b6986cda
into e57a8f344c
This commit is contained in:
commit
fecc592f36
@ -47,6 +47,7 @@ This theme is based loosely on [agnoster][agnoster].
|
|||||||
* Current RVM, rbenv or chruby (Ruby) version
|
* Current RVM, rbenv or chruby (Ruby) version
|
||||||
* Current virtualenv (Python) version
|
* Current virtualenv (Python) version
|
||||||
* _If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish: `set -x VIRTUAL_ENV_DISABLE_PROMPT 1`_
|
* _If you use virtualenv, you will probably need to disable the default virtualenv prompt, since it doesn't play nice with fish: `set -x VIRTUAL_ENV_DISABLE_PROMPT 1`_
|
||||||
|
* Current Node.js version
|
||||||
* Abbreviated parent directory
|
* Abbreviated parent directory
|
||||||
* Current directory, or Git or Mercurial project name
|
* Current directory, or Git or Mercurial project name
|
||||||
* Current project's repo branch (<img width="16" alt="branch-glyph" src="https://cloud.githubusercontent.com/assets/53660/8768360/53ee9b58-2e32-11e5-9977-cee0063936fa.png"> master) or detached head (`➦` d0dfd9b)
|
* Current project's repo branch (<img width="16" alt="branch-glyph" src="https://cloud.githubusercontent.com/assets/53660/8768360/53ee9b58-2e32-11e5-9977-cee0063936fa.png"> master) or detached head (`➦` d0dfd9b)
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
# set -g theme_display_hg yes
|
# set -g theme_display_hg yes
|
||||||
# set -g theme_display_virtualenv no
|
# set -g theme_display_virtualenv no
|
||||||
# set -g theme_display_ruby no
|
# set -g theme_display_ruby no
|
||||||
|
# set -g theme_display_node yes
|
||||||
# set -g theme_display_user yes
|
# set -g theme_display_user yes
|
||||||
# set -g theme_display_hostname yes
|
# set -g theme_display_hostname yes
|
||||||
# set -g theme_display_vi no
|
# set -g theme_display_vi no
|
||||||
@ -686,6 +687,13 @@ function __bobthefish_prompt_virtualgo -S -d 'Display current Go virtual environ
|
|||||||
set_color normal
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function __bobthefish_prompt_node -S -d 'Display current Node.js version'
|
||||||
|
[ "$theme_display_node" != 'yes' ]; and return
|
||||||
|
__bobthefish_start_segment $__color_node
|
||||||
|
set -l node_version (node --version)
|
||||||
|
echo -ns $__bobthefish_node_glyph
|
||||||
|
echo -ns $white $node_version
|
||||||
|
end
|
||||||
|
|
||||||
# ==============================
|
# ==============================
|
||||||
# VCS segments
|
# VCS segments
|
||||||
@ -947,6 +955,10 @@ function __bobthefish_maybe_display_colors -S
|
|||||||
echo -ns $__bobthefish_go_glyph virtualgo ' '
|
echo -ns $__bobthefish_go_glyph virtualgo ' '
|
||||||
__bobthefish_finish_segments
|
__bobthefish_finish_segments
|
||||||
|
|
||||||
|
__bobthefish_start_segment $__color_node
|
||||||
|
echo -ns $__bobthefish_node_glyph node ' '
|
||||||
|
__bobthefish_finish_segments
|
||||||
|
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -1020,6 +1032,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __bobthefish_virtualenv_glyph \uE73C ' '
|
set __bobthefish_virtualenv_glyph \uE73C ' '
|
||||||
set __bobthefish_ruby_glyph \uE791 ' '
|
set __bobthefish_ruby_glyph \uE791 ' '
|
||||||
set __bobthefish_go_glyph \uE626 ' '
|
set __bobthefish_go_glyph \uE626 ' '
|
||||||
|
set __bobthefish_node_glyph \uE60C ' '
|
||||||
|
|
||||||
set __bobthefish_vagrant_running_glyph \uF431 # ↑ 'running'
|
set __bobthefish_vagrant_running_glyph \uF431 # ↑ 'running'
|
||||||
set __bobthefish_vagrant_poweroff_glyph \uF433 # ↓ 'poweroff'
|
set __bobthefish_vagrant_poweroff_glyph \uF433 # ↓ 'poweroff'
|
||||||
@ -1119,6 +1132,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm brmagenta $colorfg --bold
|
set __color_rvm brmagenta $colorfg --bold
|
||||||
set __color_virtualfish brblue $colorfg --bold
|
set __color_virtualfish brblue $colorfg --bold
|
||||||
set __color_virtualgo brblue $colorfg --bold
|
set __color_virtualgo brblue $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'terminal-light*'
|
case 'terminal-light*'
|
||||||
set -l colorfg white
|
set -l colorfg white
|
||||||
@ -1148,6 +1162,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm brmagenta $colorfg --bold
|
set __color_rvm brmagenta $colorfg --bold
|
||||||
set __color_virtualfish brblue $colorfg --bold
|
set __color_virtualfish brblue $colorfg --bold
|
||||||
set __color_virtualgo brblue $colorfg --bold
|
set __color_virtualgo brblue $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'terminal2' 'terminal2-dark*'
|
case 'terminal2' 'terminal2-dark*'
|
||||||
set -l colorfg black
|
set -l colorfg black
|
||||||
@ -1177,6 +1192,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm brmagenta $colorfg --bold
|
set __color_rvm brmagenta $colorfg --bold
|
||||||
set __color_virtualfish brblue $colorfg --bold
|
set __color_virtualfish brblue $colorfg --bold
|
||||||
set __color_virtualgo brblue $colorfg --bold
|
set __color_virtualgo brblue $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'terminal2-light*'
|
case 'terminal2-light*'
|
||||||
set -l colorfg white
|
set -l colorfg white
|
||||||
@ -1206,6 +1222,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm brmagenta $colorfg --bold
|
set __color_rvm brmagenta $colorfg --bold
|
||||||
set __color_virtualfish brblue $colorfg --bold
|
set __color_virtualfish brblue $colorfg --bold
|
||||||
set __color_virtualgo brblue $colorfg --bold
|
set __color_virtualgo brblue $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'zenburn'
|
case 'zenburn'
|
||||||
set -l grey 333333 # a bit darker than normal zenburn grey
|
set -l grey 333333 # a bit darker than normal zenburn grey
|
||||||
@ -1241,6 +1258,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $red $grey --bold
|
set __color_rvm $red $grey --bold
|
||||||
set __color_virtualfish $blue $grey --bold
|
set __color_virtualfish $blue $grey --bold
|
||||||
set __color_virtualgo $blue $grey --bold
|
set __color_virtualgo $blue $grey --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'base16-light'
|
case 'base16-light'
|
||||||
set -l base00 181818
|
set -l base00 181818
|
||||||
@ -1287,6 +1305,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $base08 $colorfg --bold
|
set __color_rvm $base08 $colorfg --bold
|
||||||
set __color_virtualfish $base0D $colorfg --bold
|
set __color_virtualfish $base0D $colorfg --bold
|
||||||
set __color_virtualgo $base0D $colorfg --bold
|
set __color_virtualgo $base0D $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'base16' 'base16-dark'
|
case 'base16' 'base16-dark'
|
||||||
set -l base00 181818
|
set -l base00 181818
|
||||||
@ -1333,6 +1352,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $base08 $colorfg --bold
|
set __color_rvm $base08 $colorfg --bold
|
||||||
set __color_virtualfish $base0D $colorfg --bold
|
set __color_virtualfish $base0D $colorfg --bold
|
||||||
set __color_virtualgo $base0D $colorfg --bold
|
set __color_virtualgo $base0D $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'solarized-light'
|
case 'solarized-light'
|
||||||
set -l base03 002b36
|
set -l base03 002b36
|
||||||
@ -1379,6 +1399,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $red $colorfg --bold
|
set __color_rvm $red $colorfg --bold
|
||||||
set __color_virtualfish $cyan $colorfg --bold
|
set __color_virtualfish $cyan $colorfg --bold
|
||||||
set __color_virtualgo $cyan $colorfg --bold
|
set __color_virtualgo $cyan $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'solarized' 'solarized-dark'
|
case 'solarized' 'solarized-dark'
|
||||||
set -l base03 002b36
|
set -l base03 002b36
|
||||||
@ -1425,6 +1446,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $red $colorfg --bold
|
set __color_rvm $red $colorfg --bold
|
||||||
set __color_virtualfish $cyan $colorfg --bold
|
set __color_virtualfish $cyan $colorfg --bold
|
||||||
set __color_virtualgo $cyan $colorfg --bold
|
set __color_virtualgo $cyan $colorfg --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'light'
|
case 'light'
|
||||||
# light medium dark
|
# light medium dark
|
||||||
@ -1464,6 +1486,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $ruby_red $grey[1] --bold
|
set __color_rvm $ruby_red $grey[1] --bold
|
||||||
set __color_virtualfish $blue[2] $grey[1] --bold
|
set __color_virtualfish $blue[2] $grey[1] --bold
|
||||||
set __color_virtualgo $blue[2] $grey[1] --bold
|
set __color_virtualgo $blue[2] $grey[1] --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case 'gruvbox'
|
case 'gruvbox'
|
||||||
# light medium dark darkest
|
# light medium dark darkest
|
||||||
@ -1502,6 +1525,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $red[2] $fg[2] --bold
|
set __color_rvm $red[2] $fg[2] --bold
|
||||||
set __color_virtualfish $blue[2] $fg[2] --bold
|
set __color_virtualfish $blue[2] $fg[2] --bold
|
||||||
set __color_virtualgo $blue[2] $fg[2] --bold
|
set __color_virtualgo $blue[2] $fg[2] --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
|
|
||||||
case '*' # default dark theme
|
case '*' # default dark theme
|
||||||
# light medium dark
|
# light medium dark
|
||||||
@ -1541,6 +1565,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
set __color_rvm $ruby_red $grey[1] --bold
|
set __color_rvm $ruby_red $grey[1] --bold
|
||||||
set __color_virtualfish $blue[2] $grey[1] --bold
|
set __color_virtualfish $blue[2] $grey[1] --bold
|
||||||
set __color_virtualgo $blue[2] $grey[1] --bold
|
set __color_virtualgo $blue[2] $grey[1] --bold
|
||||||
|
set __color_node 026e00 $colorfg --bold
|
||||||
end
|
end
|
||||||
|
|
||||||
# Start each line with a blank slate
|
# Start each line with a blank slate
|
||||||
@ -1565,6 +1590,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
|||||||
__bobthefish_prompt_rubies
|
__bobthefish_prompt_rubies
|
||||||
__bobthefish_prompt_virtualfish
|
__bobthefish_prompt_virtualfish
|
||||||
__bobthefish_prompt_virtualgo
|
__bobthefish_prompt_virtualgo
|
||||||
|
__bobthefish_prompt_node
|
||||||
|
|
||||||
# VCS
|
# VCS
|
||||||
set -l git_root (__bobthefish_git_project_dir)
|
set -l git_root (__bobthefish_git_project_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user