]> CyberLeo.Net >> Repos - CDN/bash-config.git/blob - bash-config/bash_profile.d/10-title
Current work
[CDN/bash-config.git] / bash-config / bash_profile.d / 10-title
1 # Change the window title of X terminals
2
3 _i || return
4
5 # Define the title string. Use single-quotes here, to avoid expanding right now.
6 title_string='${HOSTNAME%%.*}(${USER})'
7
8 case ${TERM} in
9 xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)
10     PROMPT_COMMAND='printf "\033]0;'"${title_string}"'\007"'
11     ;;
12 screen)
13     PROMPT_COMMAND='printf "\033_'"${title_string}"'\033\134"'
14     ;;
15 esac
16
17 unset title_string