Fix an issue about term colors

This commit is contained in:
Asocia 2021-07-17 16:36:56 +03:00
parent 7cd2b2dc5e
commit 4c9b06585a
2 changed files with 3 additions and 1 deletions

View File

@ -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

2
.zshrc
View File

@ -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