From 01bb3f6d3abb414c1812c415d6dcb0ef9579797e Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 26 Nov 2022 14:58:56 +0300 Subject: [PATCH] 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 --- dotfiles/config/tmux/tmux.conf | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/dotfiles/config/tmux/tmux.conf b/dotfiles/config/tmux/tmux.conf index 526f642..df4c01a 100644 --- a/dotfiles/config/tmux/tmux.conf +++ b/dotfiles/config/tmux/tmux.conf @@ -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)