I guess when I tried this before it was in combination with some other changes... now it works:
in ~/.tmux.conf
:
set -g set-titles on
set -g set-titles-string '#T'
in ~/.bashrc
(by the way I added |screen
to the switch statment):
if [ "$color_prompt" = yes ]; then
PS1='> '
#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*|screen)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac