update title
This commit is contained in:
parent
06de5afd7e
commit
79f0d372fc
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue