From bf0d247e53081087b002f442477056d45bbd1e48 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Mon, 26 Apr 2021 00:13:48 +0300 Subject: [PATCH] Fix(xtitle): Set xterm title/icon under screen/tmux Requires `ESC P...ESC \\` pass-through escape codes. --- bin/xtitle | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/xtitle b/bin/xtitle index f734659..ce1bd66 100755 --- a/bin/xtitle +++ b/bin/xtitle @@ -7,11 +7,14 @@ case "$TERM" in else TITLE="$@" fi - echo -n "\033]0;${TITLE}\007" # Set xterm title case "$TERM" in screen*) + echo -n "\033P\033]0;${TITLE}\007\033\\" # Set xterm title/icon echo -n "\033k${TITLE}\033\\" # Set screen/tmux caption ;; + *) + echo -n "\033]0;${TITLE}\007" # Set xterm title/icon + ;; esac ;; esac -- 2.39.5