(zsh) show if colima is running in the prompt
This commit is contained in:
parent
593d890ba4
commit
04feeec6da
3 changed files with 11 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
|
||||||
config:
|
config:
|
||||||
MD004: false
|
MD004: false
|
||||||
MD013: false
|
MD013: false
|
||||||
|
MD022: false
|
||||||
MD032: false
|
MD032: false
|
||||||
MD034: false
|
MD034: false
|
||||||
|
|
|
@ -3,4 +3,4 @@ source "${ZDOTDIR}/common.zsh"
|
||||||
# local settings
|
# local settings
|
||||||
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
if [[ -f "${HOME}/.local/config/zsh" ]]; then
|
||||||
source "${HOME}/.local/config/zsh"
|
source "${HOME}/.local/config/zsh"
|
||||||
fi
|
fi
|
|
@ -13,7 +13,14 @@
|
||||||
function prompt_container() {
|
function prompt_container() {
|
||||||
container_status=$(ps auxw | grep container-apiserver | grep -v grep)
|
container_status=$(ps auxw | grep container-apiserver | grep -v grep)
|
||||||
if [[ -n ${container_status} ]]; then
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +35,7 @@
|
||||||
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
|
||||||
command_execution_time
|
command_execution_time
|
||||||
vi_mode
|
vi_mode
|
||||||
|
colima
|
||||||
container
|
container
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue