1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 19:41:08 +01:00

zsh magic

This commit is contained in:
Kierán Meinhardt
2019-03-21 21:40:57 +01:00
parent 739e40ede8
commit 1460818ecb

View File

@@ -68,13 +68,13 @@ in {
''; '';
promptInit = '' promptInit = ''
autoload -Uz vcs_info autoload -Uz vcs_info
zstyle ':vcs_info:*:' enable git zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*:' check-for-changes true zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:*:' stagedstr '%F{green}+%f' zstyle ':vcs_info:*' stagedstr '%F{green}+%f'
zstyle ':vcs_info:*:' unstagedstr '%F{red}~%f' zstyle ':vcs_info:*' unstagedstr '%F{red}~%f'
zstyle ':vcs_info:*:' use-prompt-escapes true zstyle ':vcs_info:*' use-prompt-escapes true
zstyle ':vcs_info:*:' formats "%c%u%F{cyan}%b%f" zstyle ':vcs_info:*' formats "%c%u%F{cyan}%b%f"
zstyle ':vcs_info:*:' actionformats "(%a) %c%u%F{cyan}%b%f" zstyle ':vcs_info:*' actionformats "(%a) %c%u%F{cyan}%b%f"
precmd () { precmd () {
vcs_info vcs_info
@@ -85,6 +85,16 @@ in {
PROMPT='%B%~%b %(?.%F{green}.%F{red})%#%f ' PROMPT='%B%~%b %(?.%F{green}.%F{red})%#%f '
fi fi
} }
zle-keymap-select zle-line-init () {
case $KEYMAP in
vicmd) print -n '\e]12;green\a';;
viins|main) print -n '\e]12;gray\a';;
esac
}
zle -N zle-line-init
zle -N zle-keymap-select
''; '';
}; };