From: Oleg Broytman Date: Sun, 25 Apr 2021 21:13:48 +0000 (+0300) Subject: Fix(xtitle): Set xterm title/icon under screen/tmux X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=bf0d247e53081087b002f442477056d45bbd1e48;p=dotfiles.git Fix(xtitle): Set xterm title/icon under screen/tmux Requires `ESC P...ESC \\` pass-through escape codes. --- 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