i noticed in arch based systems the title was being set to an inital prompt based one..
looking into it showed this: in bashrc:
```
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
```
(the printf part can of course be adjusted to suit)
i guess PROMPT_COMMAND is something window managers can understand..
not sure about other shells eg. this doesn't work directly with zshrc
i noticed in arch based systems the title was being set to an inital prompt based one.. |rxvt*| Eterm|aterm| kterm|gnome* ) COMMAND= ${PROMPT_ COMMAND: +$PROMPT_ COMMAND; }'printf "\033]0; %s@%s:% s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
looking into it showed this: in bashrc:
```
case ${TERM} in
xterm*
PROMPT_
;; COMMAND= ${PROMPT_ COMMAND: +$PROMPT_ COMMAND; }'printf "\033_% s@%s:%s\ 033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
screen*)
PROMPT_
;;
esac
```
(the printf part can of course be adjusted to suit)
i guess PROMPT_COMMAND is something window managers can understand..
not sure about other shells eg. this doesn't work directly with zshrc