update title

This commit is contained in:
Rasmus Moorats 2021-04-13 15:55:47 +03:00
parent 06de5afd7e
commit 79f0d372fc
Signed by: xx
GPG key ID: FE14255A6AE7241C

View file

@ -30,3 +30,18 @@ zstyle ':vcs_info:git*' formats "%{${fg[cyan]}%}[%{${fg[blue]}%}%b%{${fg[yellow]
zstyle ':prompt:grml:left:setup' items rc ssh-conn virtual-env change-root path vcs percent
zstyle ':prompt:grml:right:setup' use-rprompt false
RPS1=''
function set_title_precmd () {
set_title ${(%):-"%~"}
}
# Sets the title as name of program currently running
function set_title_preexec () {
set_title "${(%):-}" "$2"
}
if [[ "$TERM" == (alacritty*|gnome*|konsole*|putty*|rxvt*|screen*|tmux*|xterm*) ]]; then
autoload -Uz add-zsh-hook
add-zsh-hook -Uz precmd set_title_precmd
add-zsh-hook -Uz preexec set_title_preexec
fi