- echo -ne "\033]0;${TITLE}\007" # Set xterm title
- ;;
-esac
-
-case "$TERM" in
- screen*)
- echo -ne "\033k${TITLE}\033\\" # Set screen/tmux caption
+ 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