summaryrefslogtreecommitdiff
path: root/tmux
diff options
context:
space:
mode:
Diffstat (limited to 'tmux')
-rw-r--r--tmux/.tmux.conf10
1 files changed, 6 insertions, 4 deletions
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index 3e94f46..39178cc 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -52,10 +52,12 @@ bind -n M-Down select-pane -D
# Enable mouse control (clickable windows, panes, resizable panes)
-#set -g mouse-select-window on
-#set -g mouse-select-pane on
-#set -g mouse-resize-pane on
-set -g mouse on
+if-shell -b '[ "$(echo "$TMUX_VERSION < 2.1" | bc)" = 1 ]' " \
+ set -g mouse-select-window on; \
+ set -g mouse-select-pane on; \
+ set -g mouse-resize-pane on"
+
+if-shell -b '[ "$(echo "$TMUX_VERSION >= 2.1" | bc)" = 1 ]' "set -g mouse on"
# don't rename windows automatically
set-option -g allow-rename off