dotfiles: update tmux.conf

Now that all my hosts are running new enough userlands to support
the tmux-256color terminfo entry I can use it everywhere. Notably
this enables italics to work inside tmux.

Also update comment about the tmux-specific terminfo extensions
for true color. I need to keep using "Tc" until all my hosts have
tmux 3.2+.

See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
See: https://github.com/tmux/tmux/wiki/FAQ#i-dont-see-italics-or-italics-and-reverse-are-the-wrong-way-round
This commit is contained in:
Alan Orth 2022-11-26 14:58:56 +03:00
parent b3a7212ff7
commit 01bb3f6d3a
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -102,14 +102,20 @@ set-option -g status-right '#[fg=colour47]#H #[fg=red]#(cut -d " " -f 1-3 /proc/
# scrollback buffer
set-option -g history-limit 4096
# 2020-07-10: According to the tmux FAQ, inside tmux TERM must be "screen",
# "tmux" or similar (such as "tmux-256color"). Systems with older terminfo
# like CentOS 7 don't support tmux-256color so let's keep screen-256color
# for now.
set-option -g default-terminal "screen-256color"
# 2022-11-07: Tell Tmux that outside terminal supports true color
# 2022-11-26: According to the tmux FAQ, inside tmux TERM must be "screen",
# "tmux" or similar (such as "tmux-256color"). As of CentOS Stream 8, now
# all my systems support this (check with `infocmp tmux-256color`).
#
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-a-256-colour-terminal
set-option -g default-terminal "tmux-256color"
# 2022-11-26: Tell Tmux that the outside terminal supports true color. I
# need to use the tmux-specific extension "Tc" for now until all my hosts
# are on tmux 3.2+.
#
# See: https://github.com/tmux/tmux/wiki/FAQ#how-do-i-use-rgb-colour
# See: https://jdhao.github.io/2018/10/19/tmux_nvim_true_color/
set -ga terminal-overrides ",xterm-256color*:Tc"
set -as terminal-overrides ",*-256color*:Tc"
#### COLOUR (Solarized dark)