mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-02-26 18:40:46 +01:00
zshrc: dynamic terminal title
This commit is contained in:
parent
fccaa217f1
commit
9b8c67d917
18
rc/zshrc
18
rc/zshrc
@ -8,6 +8,24 @@
|
||||
uname=$(uname)
|
||||
UNAME=$(uname)
|
||||
|
||||
# Dynamic window title via https://stackoverflow.com/a/20772424
|
||||
case $TERM in
|
||||
(*xterm* | *rxvt*)
|
||||
|
||||
# Write some info to terminal title.
|
||||
# This is seen when the shell prompts for input.
|
||||
function precmd {
|
||||
print -Pn "\e]0;zsh%L %(1j,%j job%(2j|s|); ,)%~\a"
|
||||
}
|
||||
# Write command and args to terminal title.
|
||||
# This is seen while the shell waits for a command to complete.
|
||||
function preexec {
|
||||
printf "\033]0;%s\a" "$1"
|
||||
}
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
# enable terminal bell
|
||||
|
||||
if [[ -f /usr/bin/xset ]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user