Depois de várias idas e vindas do tmux, eu finalmente encontrei uma solução que funciona exatamente do jeito que eu quero, em todos os emuladores de terminal que eu quero (iTerm / Kitty / Terminal.app), com ou sem tmux
bashrc
case "$TERM" in
tmux*)
export PROMPT_COMMAND='echo -ne "3]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}# use titles
set-option -g set-titles on
set-option -g set-titles-string "#T"
set-option -g automatic-rename on
7"'
;;
xterm*)
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "3];${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}case "$TERM" in
tmux*)
export PROMPT_COMMAND='echo -ne "3]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}# use titles
set-option -g set-titles on
set-option -g set-titles-string "#T"
set-option -g automatic-rename on
7"'
;;
xterm*)
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "3];${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}%pre%7"; '
else
export PROMPT_COMMAND='echo -ne "3]${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}%pre%7"; '
fi
;;
esac
7"; '
else
export PROMPT_COMMAND='echo -ne "3]${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}%pre%7"; '
fi
;;
esac
tmux
%pre%