(zsh) notify in prompt if apple container is running

This commit is contained in:
Bartek Stalewski 2025-07-17 16:03:51 +02:00
parent ff2bcb6bb5
commit 3cdff21756
No known key found for this signature in database

View file

@ -10,6 +10,13 @@
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
autoload -Uz is-at-least && is-at-least 5.1 || return 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=( typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# aws # aws
# terraform # terraform
@ -25,6 +32,7 @@
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
command_execution_time command_execution_time
vi_mode vi_mode
container
) )
typeset -g POWERLEVEL9K_MODE=nerdfont-complete typeset -g POWERLEVEL9K_MODE=nerdfont-complete