]> git.phdru.name Git - dotfiles.git/commitdiff
Fix(bash_prompt): Fix xterm title/icon under `screen`
authorOleg Broytman <phd@phdru.name>
Sun, 25 Apr 2021 22:34:24 +0000 (01:34 +0300)
committerOleg Broytman <phd@phdru.name>
Sun, 25 Apr 2021 22:34:24 +0000 (01:34 +0300)
admin/prog/bash_prompt

index 02141e3581ab17bf4400720b642e256a7872159d..22445711837d5fe68abde83ee598d3e32936687f 100644 (file)
@@ -108,9 +108,10 @@ set_prompts() {
       # in the terminal title
       case "$TERM" in
          *rxvt*|screen*|*term*|vt100)
-            OPS1+="\[\033]0;${_COMMON_PROMPT}\007\]"
+            OPS1="\[\033]0;${_COMMON_PROMPT}\007\]" # Set xterm title/icon
             case "$TERM" in
                screen*)
+                  OPS1="\[\033P\033]0;${_COMMON_PROMPT}\007\033\\\\\]" # Set xterm title/icon under screen/tmux
                   OPS1+="\[\033k${_COMMON_PROMPT}\033\\\\\]" # Set screen/tmux caption
                ;;
             esac