From 6b46e82aaf65c9ef292e596e39efbfccc45d9c2a Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sun, 27 Sep 2015 09:26:51 +0300 Subject: [PATCH] tmux.conf: use tmux-256color For older systems use tmux-old-ncurses.bash (also added in this commit) for forcing screen-256color instead. From what I have understood the difference is that screen-256color doesn't handle italics or something. --- conf/tmux-old-ncurses.bash | 6 ++++++ conf/tmux.conf | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100755 conf/tmux-old-ncurses.bash diff --git a/conf/tmux-old-ncurses.bash b/conf/tmux-old-ncurses.bash new file mode 100755 index 00000000..744688c8 --- /dev/null +++ b/conf/tmux-old-ncurses.bash @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# Intended for systems with ncurses < 6 which is missing TERMINFO +# for tmux-256color. +if [[ $TERM == 'tmux-256color' ]]; then + export TERM=screen-256color +fi diff --git a/conf/tmux.conf b/conf/tmux.conf index c9427479..b47d7371 100644 --- a/conf/tmux.conf +++ b/conf/tmux.conf @@ -27,10 +27,10 @@ set -g base-index 1 bind-key 0 select-window -t :10 # Terminal supports 256colors -# This should be tmux-256color since ncurses 6.0, consider changing it -# when ncurses 6.0 hits Debian Stable or is in all systems I have access -# to. -set -g default-terminal "screen-256color" +# In case of older ncurses than 6 / terminfo problems, put the +# tmux-old-ncurses.bash to ~/.custom or somewhere it gets read on shell +# startup. +set -g default-terminal "tmux-256color" # Terminal emulator window titles set -g set-titles on