diff options
author | terminaldweller <thabogre@gmail.com> | 2021-11-10 11:51:38 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-11-10 11:51:38 +0000 |
commit | 216beb6c4dc046501566305e15fb731bd9a7f052 (patch) | |
tree | 3f1397a93deda04401e7192328ac3a2834eee466 /devi.zsh-theme | |
parent | more cleanup (diff) | |
download | scripts-216beb6c4dc046501566305e15fb731bd9a7f052.tar.gz scripts-216beb6c4dc046501566305e15fb731bd9a7f052.zip |
updates
Diffstat (limited to 'devi.zsh-theme')
-rw-r--r-- | devi.zsh-theme | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/devi.zsh-theme b/devi.zsh-theme index f64505e..38f167f 100644 --- a/devi.zsh-theme +++ b/devi.zsh-theme @@ -59,6 +59,7 @@ if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then yablue="%F{32}" yagreen="%F{34}" babyblue="%F{39}" + somegreen="%F{22}" else turquoise="$fg[cyan]" orange="$fg[yellow]" @@ -262,8 +263,17 @@ rebuildquery() { fi } +zstyle ':zsh-kubectl-prompt:' separator ':' +getkubernetesinfo() { + local SUB_PROMPT="%{$somegreen%}<$ZSH_KUBECTL_USER:$ZSH_KUBECTL_PROMPT>%{$reset_color%}" + if [[ "$ZSH_KUBECTL_USER" =~ "admin" ]];then + SUB_PROMPT="%{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}" + fi + echo $SUB_PROMPT +} -PS1=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$yagreen%}$(pwd_shortened)%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$babyblue%}$(ruby_version)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%}' +# PS1=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$yagreen%}$(pwd_shortened)%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$babyblue%}$(ruby_version)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_USER:$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%}' +PS1=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$yagreen%}$(pwd_shortened)%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$babyblue%}$(ruby_version)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} $(getkubernetesinfo)%{$batred%}$(dir_writeable)%{$reset_color%}' PS2=$'' PS3=$'\n%{$limblue%}--➜%{$reset_color%}' get_prompt_len() { |