diff --git a/config/common/zsh/p10k.zsh b/config/common/zsh/p10k.zsh index d54d89e..5f6ed0d 100644 --- a/config/common/zsh/p10k.zsh +++ b/config/common/zsh/p10k.zsh @@ -10,6 +10,13 @@ unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' autoload -Uz is-at-least && is-at-least 5.1 || return + function prompt_container() { + container_status=$(ps auxw | grep container-apiserver | grep -v grep) + if [[ -n ${container_status} ]]; then + p10k segment -f 2 -i '' -t 'CONTAINER' + fi + } + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( # aws # terraform @@ -25,6 +32,7 @@ typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( command_execution_time vi_mode + container ) typeset -g POWERLEVEL9K_MODE=nerdfont-complete