(zsh) notify in prompt if apple container is running
This commit is contained in:
parent
ff2bcb6bb5
commit
3cdff21756
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue