From 927aa7231927716eff7bcadd75ff541e56352e92 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Tue, 28 Apr 2020 08:52:58 +0100 Subject: [PATCH] Detect tmux version for mouse option --- roles/home-cli/files/tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/home-cli/files/tmux.conf b/roles/home-cli/files/tmux.conf index b8129c2..c1cd0b8 100644 --- a/roles/home-cli/files/tmux.conf +++ b/roles/home-cli/files/tmux.conf @@ -7,7 +7,10 @@ set -g base-index 1 set -g default-command "$SHELL" set -g default-terminal "screen-256color" set -g display-panes-time 5000 -set -g mouse on set -g pane-base-index 1 set -g status-right '' set-window-option -g xterm-keys on + +# RHEL 7 still ships with version 1.8 +if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' \ + "set -g mouse on"