diff --git a/functions/__bobthefish_colors.fish b/functions/__bobthefish_colors.fish index c3f4516..c2265a3 100644 --- a/functions/__bobthefish_colors.fish +++ b/functions/__bobthefish_colors.fish @@ -32,6 +32,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired blue red --bold set -x color_username white black --bold set -x color_hostname white black + set -x color_screen brgreen $colorfg --bold set -x color_rvm brmagenta $colorfg --bold set -x color_node brgreen $colorfg --bold set -x color_virtualfish brblue $colorfg --bold @@ -67,6 +68,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired blue red --bold set -x color_username black white --bold set -x color_hostname black white + set -x color_screen brgreen $colorfg --bold set -x color_rvm brmagenta $colorfg --bold set -x color_node brgreen $colorfg --bold set -x color_virtualfish brblue $colorfg --bold @@ -102,6 +104,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired blue red --bold set -x color_username brgrey white --bold set -x color_hostname brgrey white + set -x color_screen brgreen $colorfg --bold set -x color_rvm brmagenta $colorfg --bold set -x color_node brgreen $colorfg --bold set -x color_virtualfish brblue $colorfg --bold @@ -137,6 +140,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired blue red --bold set -x color_username grey black --bold set -x color_hostname grey black + set -x color_screen brgreen $colorfg --bold set -x color_rvm brmagenta $colorfg --bold set -x color_node brgreen $colorfg --bold set -x color_virtualfish brblue $colorfg --bold @@ -178,6 +182,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $blue $red --bold set -x color_username $grey $blue --bold set -x color_hostname $grey $blue + set -x color_screen $green $grey --bold set -x color_rvm $red $grey --bold set -x color_node $green $white --bold set -x color_virtualfish $blue $grey --bold @@ -230,6 +235,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $base0D $base08 --bold set -x color_username $base02 $base0D --bold set -x color_hostname $base02 $base0D + set -x color_screen $base06 $colorfg --bold set -x color_rvm $base08 $colorfg --bold set -x color_node $base0B $colorfg --bold set -x color_virtualfish $base0D $colorfg --bold @@ -282,6 +288,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $base0D $base08 --bold set -x color_username $base02 $base0D --bold set -x color_hostname $base02 $base0D + set -x color_screen $base0B $colorfg --bold set -x color_rvm $base08 $colorfg --bold set -x color_node $base0B $colorfg --bold set -x color_virtualfish $base0D $colorfg --bold @@ -334,6 +341,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $violet $orange --bold set -x color_username $base2 $blue --bold set -x color_hostname $base2 $blue + set -x color_screen $green $colorfg --bold set -x color_rvm $red $colorfg --bold set -x color_node $green $colorfg --bold set -x color_virtualfish $cyan $colorfg --bold @@ -386,6 +394,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $violet $orange --bold set -x color_username $base02 $blue --bold set -x color_hostname $base02 $blue + set -x color_screen $green $colorfg --bold set -x color_rvm $red $colorfg --bold set -x color_node $green $colorfg --bold set -x color_virtualfish $cyan $colorfg --bold @@ -431,6 +440,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $blue[3] $red[3] --bold set -x color_username $grey[1] $blue[3] --bold set -x color_hostname $grey[1] $blue[3] + set -x color_screen $green[1] $colorfg --bold set -x color_rvm $ruby_red $grey[1] --bold set -x color_node $green $grey[1] --bold set -x color_virtualfish $blue[2] $grey[1] --bold @@ -475,6 +485,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $blue[2] $red[1] --bold set -x color_username $fg[3] $blue[2] --bold set -x color_hostname $fg[3] $blue[2] + set -x color_screen $green[1] $fg[2] --bold set -x color_rvm $red[2] $fg[2] --bold set -x color_node $green[1] $fg[2] --bold set -x color_virtualfish $blue[2] $fg[2] --bold @@ -563,6 +574,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $comment $red --bold set -x color_username $selection $cyan --bold set -x color_hostname $selection $cyan + set -x color_screen $green $bg --bold set -x color_rvm $red $bg --bold set -x color_node $green $bg --bold set -x color_virtualfish $comment $bg --bold @@ -615,6 +627,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $base0A $base0B --bold set -x color_username $base02 $base0D --bold set -x color_hostname $base02 $base0D + set -x color_screen $base02 $colorfg --bold set -x color_rvm $base09 $colorfg --bold set -x color_node $base09 $colorfg --bold set -x color_virtualfish $base09 $colorfg --bold @@ -1002,6 +1015,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_aws_vault_expired $blue[3] $red[3] --bold set -x color_username $grey[1] $blue[3] --bold set -x color_hostname $grey[1] $blue[3] + set -x color_screen $green[1] $white --bold set -x color_rvm $ruby_red $grey[1] --bold set -x color_node $green[1] $white --bold set -x color_virtualfish $blue[2] $grey[1] --bold @@ -1070,6 +1084,7 @@ function __bobthefish_user_color_scheme_deprecated set -x color_aws_vault_expired $__color_aws_vault_expired set -x color_username $__color_username set -x color_hostname $__color_hostname + set -x color_screen $__color_screen set -x color_rvm $__color_rvm set -x color_virtualfish $__color_virtualfish set -x color_virtualgo $__color_virtualgo diff --git a/functions/bobthefish_display_colors.fish b/functions/bobthefish_display_colors.fish index 731524b..b5fbe4b 100644 --- a/functions/bobthefish_display_colors.fish +++ b/functions/bobthefish_display_colors.fish @@ -128,6 +128,10 @@ function bobthefish_display_colors -a color_scheme -d 'Print example prompt colo __bobthefish_finish_segments echo + __bobthefish_start_segment $color_screen + echo -ns 'screen ' + __bobthefish_finish_segments + __bobthefish_start_segment $color_rvm echo -ns $ruby_glyph rvm ' ' __bobthefish_finish_segments diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index ebb3983..13d19da 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -17,7 +17,6 @@ # # See README.md for setup and configuration options. # - # ============================== # Helper methods # ============================== @@ -1054,6 +1053,20 @@ function __bobthefish_prompt_hg -S -a hg_root_dir -a real_pwd -d 'Display the ac end end +function __bobthefish_prompt_screen -S -d 'Display the screen name' + [ "$theme_display_screen" = 'no' ] + and return + + [ -z "$STY" ] + and return + + __bobthefish_start_segment $color_screen + [ "$theme_display_screen_verbose" = "yes" ] + and echo -ns (string split "." -- $STY)[2] + echo -ns ' ' + set_color normal +end + function __bobthefish_prompt_git -S -a git_root_dir -a real_pwd -d 'Display the actual git state' set -l dirty '' if [ "$theme_display_git_dirty" != 'no' ] @@ -1210,6 +1223,9 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' # User / hostname info __bobthefish_prompt_user + # Screen + __bobthefish_prompt_screen + # Containers and VMs __bobthefish_prompt_vagrant __bobthefish_prompt_docker