From a235695483a258b587ae9385becabad2098fac4c Mon Sep 17 00:00:00 2001 From: Bartek Stalewski Date: Mon, 15 Sep 2025 16:34:49 +0200 Subject: [PATCH] (zsh) show if colima is running in the prompt --- .../common/nvim/linters/global.markdownlint-cli2.yaml | 2 +- config/common/zsh/.zshrc | 2 +- config/common/zsh/aliases.zsh | 3 +++ config/common/zsh/p10k.zsh | 10 +++++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config/common/nvim/linters/global.markdownlint-cli2.yaml b/config/common/nvim/linters/global.markdownlint-cli2.yaml index 8e1a958..cbf3100 100644 --- a/config/common/nvim/linters/global.markdownlint-cli2.yaml +++ b/config/common/nvim/linters/global.markdownlint-cli2.yaml @@ -1,6 +1,6 @@ ---- config: MD004: false MD013: false + MD022: false MD032: false MD034: false diff --git a/config/common/zsh/.zshrc b/config/common/zsh/.zshrc index a375c35..6e31c3b 100644 --- a/config/common/zsh/.zshrc +++ b/config/common/zsh/.zshrc @@ -3,4 +3,4 @@ source "${ZDOTDIR}/common.zsh" # local settings if [[ -f "${HOME}/.local/config/zsh" ]]; then source "${HOME}/.local/config/zsh" -fi +fi \ No newline at end of file diff --git a/config/common/zsh/aliases.zsh b/config/common/zsh/aliases.zsh index d88ce2e..36a1e86 100644 --- a/config/common/zsh/aliases.zsh +++ b/config/common/zsh/aliases.zsh @@ -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' diff --git a/config/common/zsh/p10k.zsh b/config/common/zsh/p10k.zsh index aeeb09b..6b0c523 100644 --- a/config/common/zsh/p10k.zsh +++ b/config/common/zsh/p10k.zsh @@ -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 )