Update dotfiles

This commit is contained in:
2025-11-06 10:01:30 +01:00
parent b41eb3bfef
commit 2465032eef
7 changed files with 76 additions and 91 deletions

30
zsh/prompt.zsh Normal file
View File

@@ -0,0 +1,30 @@
autoload -Uz add-zsh-hook
autoload -Uz vcs_info
add-zsh-hook precmd vcs_info
precmd() {
# Print the previously configured title
print -Pnr -- "$TERM_TITLE"
print ""
}
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr '+'
zstyle ':vcs_info:git:*' unstagedstr '!'
zstyle ':vcs_info:git:*' formats '(%s %b%u%c)'
zstyle ':vcs_info:git:*' actionformats '(%s %b%u%c %a)'
zstyle ':vcs_info:*:*' actionformats '(%s %b)'
setopt prompt_subst
setopt print_exit_value
# ternary example: "%(?.A.B)"
# (here ? is the previous return)
PROMPT='%F{240} [%T] %~ ${vcs_info_msg_0_}
$%f '
RPROMPT=""