From 55e50afc87d7f8893f6e386397877e0ccb1b34c5 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Thu, 8 Oct 2026 16:09:21 +0200 Subject: [PATCH] chore(zsh): update theme --- config/zsh/theme.zsh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/config/zsh/theme.zsh b/config/zsh/theme.zsh index a5730dd..e323933 100644 --- a/config/zsh/theme.zsh +++ b/config/zsh/theme.zsh @@ -1,15 +1,19 @@ +autoload -Uz add-zsh-hook vcs_info +setopt prompt_subst +add-zsh-hook precmd vcs_info local return_code="%F{9}%? ↵%{$reset_color%})" local user_host="%B%F{9}%n%F{15}@%F{172}%m%f " local user_symbol='%(!.#.$)' -local current_dir="%B%F{2}%1~ %f" -local vcs_info='' -local venv_prompt='' - -precmd () { - vcs_info="git status" -} - +local current_dir="%B%F{2}%~ %f" +local vcs_info='%F{14}${vcs_info_msg_0_}%f' PS1="╭─${user_host}${current_dir}${vcs_info}${venv_prompt} ╰─%B${user_symbol}%b " RPROMPT="%B${return_code}%b" + +# Enable checking for (un)staged changes, enabling use of %u and %c +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:*' unstagedstr ' *%n' +zstyle ':vcs_info:*' stagedstr ' +' +zstyle ':vcs_info:git:*' formats '(%b%u%c)' +zstyle ':vcs_info:git:*' actionformats '(%b|%a%u%c)'