X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Fxtitle;h=ce1bd66d117dd16594dbf45c8c5afb5dd76c1988;hb=dfa0b0b193cb91fd6151568bb1ad577743450b47;hp=4c1cefc987e92d09ebefa7fda5670ccac1ddc971;hpb=b0e4766f74b0e2213eadc6871f6ff8c79ed7dc07;p=dotfiles.git diff --git a/bin/xtitle b/bin/xtitle index 4c1cefc..ce1bd66 100755 --- a/bin/xtitle +++ b/bin/xtitle @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /bin/sh case "$TERM" in *rxvt*|screen*|*term*|vt100) @@ -7,10 +7,13 @@ case "$TERM" in else TITLE="$@" fi - echo -ne "\033]0;${TITLE}\007" # Set xterm title case "$TERM" in screen*) - echo -ne "\033k${TITLE}\033\\" # Set screen/tmux caption + 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 ;;