diff --git a/.tmux.conf b/.tmux.conf index c99b61d..fe226a5 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -62,6 +62,8 @@ bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 bind-key -n C-S-Right swap-window -t +1\; select-window -t +1 set -g default-terminal "screen-256color" +# tell Tmux that outside terminal supports true color +set -ga terminal-overrides ",xterm-256color*:Tc" # start session number from 1 rather than 0 # set -g base-index 1 diff --git a/.zshrc b/.zshrc index 66071c4..97ef557 100644 --- a/.zshrc +++ b/.zshrc @@ -3,7 +3,7 @@ if type tmux &> /dev/null; then session_name=${TERMINAL_NAME:-Terminal} #if not inside a tmux session, start a new session if [[ $HOST == "ubuntu" && -z "$TMUX" ]]; then - (tmux -2 new-session -A -s $session_name || false) + ( TERM=xterm-256color tmux -2 new-session -A -s $session_name || false) # || false makes Konsole happy while quitting. It doesn't ask for # confirmation. Since we are in tmux, it doesn't matter if we really # wanted to quit or not