From 2dc486fb891e65658dff83ab34ca8878756a6a90 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 18 Oct 2024 21:52:28 -0500 Subject: initial commit --- zscripts/terminalname.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 zscripts/terminalname.zsh (limited to 'zscripts/terminalname.zsh') diff --git a/zscripts/terminalname.zsh b/zscripts/terminalname.zsh new file mode 100755 index 0000000..6e55d22 --- /dev/null +++ b/zscripts/terminalname.zsh @@ -0,0 +1,8 @@ +function xtitle () { + builtin print -n -- "\e]0;$@\a" +} + +# Updates the window title whenever a command is run +function precmd () { + xtitle "$(print -P ${USER}@${HOST} %~)" +} -- cgit v1.2.3