(zsh) show if colima is running in the prompt

This commit is contained in:
Bartek Stalewski 2025-09-15 16:34:49 +02:00
parent 593d890ba4
commit a235695483
Signed by: ftpd
SSH key fingerprint: SHA256:vGQiaNJcfUMLt3wF58+Zx15C6SpRDA9spUeggjVY8Yo
4 changed files with 14 additions and 3 deletions

View file

@ -3,4 +3,4 @@ source "${ZDOTDIR}/common.zsh"
# local settings
if [[ -f "${HOME}/.local/config/zsh" ]]; then
source "${HOME}/.local/config/zsh"
fi
fi

View file

@ -56,6 +56,9 @@ elif [ $(command -v vim) ] ; then
else
export EDITOR=vi
fi
if [ $(command -v codium) ]; then
alias vim="HOME=/Users/f codium"
fi
if [[ $(command -v rg) ]]; then
alias grep='rg -i'

View file

@ -13,7 +13,14 @@
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'
p10k segment -f 2 -i '' -t 'CONTAINER'
fi
}
function prompt_colima() {
colima_status=$(ps auxw | grep "colima daemon" | grep -v grep)
if [[ -n ${colima_status} ]]; then
p10k segment -f 1 -i '' -t 'colima'
fi
}
@ -28,6 +35,7 @@
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
command_execution_time
vi_mode
colima
container
)