diff --git a/functions/__bobthefish_colors.fish b/functions/__bobthefish_colors.fish index 1ee71d24..17c86053 100644 --- a/functions/__bobthefish_colors.fish +++ b/functions/__bobthefish_colors.fish @@ -27,6 +27,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual bryellow $colorfg --bold set -x color_vagrant brcyan $colorfg + set -x color_tf brcyan $colorfg set -x color_k8s magenta white --bold set -x color_aws_vault blue $colorfg --bold set -x color_aws_vault_expired blue red --bold @@ -62,6 +63,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual bryellow $colorfg --bold set -x color_vagrant brcyan $colorfg + set -x color_tf brcyan $colorfg set -x color_k8s magenta white --bold set -x color_aws_vault blue $colorfg --bold set -x color_aws_vault_expired blue red --bold @@ -97,6 +99,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual bryellow $colorfg --bold set -x color_vagrant brcyan $colorfg + set -x color_tf brcyan $colorfg set -x color_k8s magenta white --bold set -x color_aws_vault blue $colorfg --bold set -x color_aws_vault_expired blue red --bold @@ -132,6 +135,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual bryellow $colorfg --bold set -x color_vagrant brcyan $colorfg + set -x color_tf brcyan $colorfg set -x color_k8s magenta white --bold set -x color_aws_vault blue $colorfg --bold set -x color_aws_vault_expired blue red --bold @@ -173,6 +177,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $yellow $grey --bold set -x color_vagrant $blue $green --bold + set -x color_tf $blue $green --bold set -x color_k8s $green $white --bold set -x color_aws_vault $blue $grey --bold set -x color_aws_vault_expired $blue $red --bold @@ -225,6 +230,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $base09 $colorfg --bold set -x color_vagrant $base0C $colorfg --bold + set -x color_tf $base0C $colorfg --bold set -x color_k8s $base06 $colorfg --bold set -x color_aws_vault $base0D $colorfg --bold set -x color_aws_vault_expired $base0D $base08 --bold @@ -277,6 +283,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $base09 $colorfg --bold set -x color_vagrant $base0C $colorfg --bold + set -x color_tf $base0C $colorfg --bold set -x color_k8s $base0B $colorfg --bold set -x color_aws_vault $base0D $base0A --bold set -x color_aws_vault_expired $base0D $base08 --bold @@ -329,6 +336,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $yellow $colorfg --bold set -x color_vagrant $violet $colorfg --bold + set -x color_tf $violet $colorfg --bold set -x color_k8s $green $colorfg --bold set -x color_aws_vault $violet $base3 --bold set -x color_aws_vault_expired $violet $orange --bold @@ -381,6 +389,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $yellow $colorfg --bold set -x color_vagrant $violet $colorfg --bold + set -x color_tf $violet $colorfg --bold set -x color_k8s $green $colorfg --bold set -x color_aws_vault $violet $base3 --bold set -x color_aws_vault_expired $violet $orange --bold @@ -426,6 +435,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $orange[1] $orange[3] --bold set -x color_vagrant $blue[1] $white --bold + set -x color_tf $blue[1] $white --bold set -x color_k8s $green[1] $colorfg --bold set -x color_aws_vault $blue[3] $orange[1] --bold set -x color_aws_vault_expired $blue[3] $red[3] --bold @@ -470,6 +480,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $yellow[1] $bg[2] --bold set -x color_vagrant $blue[2] $fg[2] --bold + set -x color_tf $blue[2] $fg[2] --bold set -x color_k8s $green[2] $fg[2] --bold set -x color_aws_vault $blue[2] $yellow[1] --bold set -x color_aws_vault_expired $blue[2] $red[1] --bold @@ -516,6 +527,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $orange $bg --bold set -x color_vagrant $pink $bg --bold + set -x color_tf $pink $bg --bold set -x color_k8s $green $fg --bold set -x color_aws_vault $comment $yellow --bold set -x color_aws_vault_expired $comment $red --bold @@ -568,6 +580,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $base07 $colorfg --bold set -x color_vagrant $base02 $colorfg --bold + set -x color_tf $base02 $colorfg --bold set -x color_k8s $base02 $colorfg --bold set -x color_aws_vault $base0A $base0D --bold set -x color_aws_vault_expired $base0A $base0B --bold @@ -613,6 +626,7 @@ function __bobthefish_colors -S -a color_scheme -d 'Define colors used by bobthe set -x color_vi_mode_visual $orange[1] $orange[3] --bold set -x color_vagrant $blue[1] $white --bold + set -x color_tf $blue[1] $white --bold set -x color_k8s $green[2] $white --bold set -x color_aws_vault $blue[3] $orange[1] --bold set -x color_aws_vault_expired $blue[3] $red[3] --bold @@ -644,6 +658,7 @@ function __bobthefish_user_color_scheme_deprecated set -q __color_vi_mode_insert; or set -l __color_vi_mode_insert 189303 333333 --bold set -q __color_vi_mode_visual; or set -l __color_vi_mode_visual f6b117 3a2a03 --bold set -q __color_vagrant; or set -l __color_vagrant 48b4fb ffffff --bold + set -q __color_tf; or set -l __color_tf 48b4fb ffffff --bold set -q __color_username; or set -l __color_username cccccc 255e87 --bold set -q __color_hostname; or set -l __color_hostname cccccc 255e87 set -q __color_rvm; or set -l __color_rvm af0000 cccccc --bold diff --git a/functions/__bobthefish_glyphs.fish b/functions/__bobthefish_glyphs.fish index c0f13e28..0d296a98 100644 --- a/functions/__bobthefish_glyphs.fish +++ b/functions/__bobthefish_glyphs.fish @@ -30,6 +30,9 @@ function __bobthefish_glyphs -S -d 'Define glyphs used by bobthefish' # Kubernetes glyphs set -x k8s_glyph \u2388 # '⎈' + # Terraform glyph + set -x tf_glyph \ufcfc # 'ﳼ' + # Vagrant glyphs set -x vagrant_running_glyph \u2191 # ↑ 'running' set -x vagrant_poweroff_glyph \u2193 # ↓ 'poweroff' diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 02bfe972..c5e97a21 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -26,6 +26,7 @@ # set -g theme_display_git_default_branch yes # set -g theme_git_default_branches main trunk # set -g theme_git_worktree_support yes +# set -g theme_display_tf_workspace yes # set -g theme_display_vagrant yes # set -g theme_display_docker_machine no # set -g theme_display_k8s_context yes @@ -599,6 +600,18 @@ function __bobthefish_prompt_docker -S -d 'Display Docker machine name' echo -ns $DOCKER_MACHINE_NAME ' ' end +function __bobthefish_prompt_tf_workspace -S -d 'Display current terraform workspace environment' + [ "$theme_display_tf_workspace" = 'yes' ] + or return + + set -l tf_workspace (terraform workspace show) + + __bobthefish_start_segment $color_tf + echo -ns $tf_glyph ' ' $tf_workspace ' ' + + set_color normal +end + function __bobthefish_k8s_context -S -d 'Get the current k8s context' set -l config_paths "$HOME/.kube/config" [ -n "$KUBECONFIG" ] @@ -1129,6 +1142,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' # Containers and VMs __bobthefish_prompt_vagrant + __bobthefish_prompt_tf_workspace __bobthefish_prompt_docker __bobthefish_prompt_k8s_context