From b562962c77007cae44ae5c3900b74d6b9383d883 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Wed, 31 Jul 2019 00:26:43 -0400 Subject: [PATCH] tmux: set TERM explicitly, but be smart A few commits back I took out the setting of TERM in tmux. I was under the impression this wouldn't be an issue (for some reason, likely a non-dead server, I thought tmux was being smart about the client and setting the TERM properly). However, st was connecting and getting TERM=screen, which only has 8 colors. This commit adds a conditional to set the default-term properly for both the VC and st. --- tmux/tmux.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 46adc56..7281169 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -9,6 +9,10 @@ bind - split-window -v -c "#{pane_current_path}" unbind '"' unbind % +# Set the default terminal in a smart fashion +set default-terminal screen # More support for "screen" than "tmux" +if "[[ ${TERM} =~ 256color ]]" 'set default-terminal screen-256color' + # new window same directory bind c new-window -c "#{pane_current_path}" -- libgit2 0.28.4