aboutsummaryrefslogtreecommitdiff
path: root/zshrc.d/title
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2018-01-26 15:02:07 +0100
committerKarel Kočí <cynerd@email.cz>2018-01-26 15:26:36 +0100
commit47d3b6fc1966df43b37751165d6fa4229904c0fa (patch)
treecccb190aad69ed1afb93654922575a95e7745d03 /zshrc.d/title
downloadshellrc-5ca54ae410284b679e1de070dcf74e04bcc5c3f8.tar.gz
shellrc-5ca54ae410284b679e1de070dcf74e04bcc5c3f8.tar.bz2
shellrc-5ca54ae410284b679e1de070dcf74e04bcc5c3f8.zip
Initial commitv0.1
Diffstat (limited to 'zshrc.d/title')
-rw-r--r--zshrc.d/title12
1 files changed, 12 insertions, 0 deletions
diff --git a/zshrc.d/title b/zshrc.d/title
new file mode 100644
index 0000000..18b19d1
--- /dev/null
+++ b/zshrc.d/title
@@ -0,0 +1,12 @@
+# vim: ft=zsh
+
+case "$TERM" in
+ xterm*|*rxvt*|*st*)
+ precmd() {
+ print -Pn "\e]0;%n@%m:%~ %(1j,%j job%(2j|s|) ,)\a"
+ }
+ preexec() {
+ print -Pn "\e]0;%n@%m:%~ !$1\a"
+ }
+ ;;
+esac