1
0
Fork 0
mirror of synced 2024-06-24 06:41:09 -04:00

make sure to use /usr/bin/infocmp to probe if tmux-256color is available system wide (2), fixes #617

some operating systems like NixOS don't have /usr/bin/infocmp
This commit is contained in:
Gregory Pakosz 2023-01-21 21:57:51 +01:00
parent 2cf4d9a104
commit 044d6336e8

View file

@ -10,7 +10,6 @@
# -- general -------------------------------------------------------------------
set -g default-terminal "screen-256color"
if '/usr/bin/infocmp -x tmux-256color > /dev/null 2>&1' 'set -g default-terminal "tmux-256color"'
setw -g xterm-keys on
set -s escape-time 10 # faster command sequences
@ -690,6 +689,19 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# _split_window_ssh "$@"
# }
#
# _apply_tmux_256color() {
# # when tmux-256color is available, use it
# # on macOS though, make sure to use /usr/bin/infocmp to probe if it's availalbe system wide
# case "$uname_s" in
# *Darwin*)
# /usr/bin/infocmp -x tmux-256color > /dev/null 2>&1 && tmux set -g default-terminal 'tmux-256color'
# ;;
# *)
# command infocmp -x tmux-256color > /dev/null 2>&1 && tmux set -g default-terminal 'tmux-256color'
# ;;
# esac
# }
#
# _apply_24b() {
# tmux_conf_theme_24b_colour=${tmux_conf_theme_24b_colour:-auto}
# tmux_conf_24b_colour=${tmux_conf_24b_colour:-$tmux_conf_theme_24b_colour}
@ -1481,6 +1493,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# ;;
# esac
#
# _apply_tmux_256color
# _apply_24b&
# _apply_theme&
# _apply_bindings&