From c9222a9fef53530845a7fde4251f1772a24fc594 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 6 Oct 2018 09:30:10 +0200 Subject: [PATCH] Increase backward compatibility for tmux configuration file --- tmux.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tmux.conf b/tmux.conf index d363c73..fb055dd 100644 --- a/tmux.conf +++ b/tmux.conf @@ -24,7 +24,10 @@ set -sg escape-time 0 set -g history-limit 30000 -setw -g mouse off +# https://stackoverflow.com/questions/11832199/tmux-set-g-mouse-mode-on-doesnt-work +is_older="[[ $(tmux -V | cut -d' ' -f2) -lt 2.1 ]] && true || false" +if-shell "$is_older" "set -g mode-mouse off; set -g mouse-resize-pane off;\ + set -g mouse-select-pane off; set -g mouse-select-window off" "set -g mouse off" set -g display-time 2000