(zsh) show if colima is running in the prompt
This commit is contained in:
parent
593d890ba4
commit
a235695483
4 changed files with 14 additions and 3 deletions
|
@ -3,4 +3,4 @@ source "${ZDOTDIR}/common.zsh"
|
|||
# local settings
|
||||
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
||||
source "${HOME}/.local/config/zsh"
|
||||
fi
|
||||
fi
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue