Conditional to set mouse correctly depending on tmux version

This commit is contained in:
jon
2017-09-09 13:51:28 -05:00
parent b8a66cc256
commit 7ef6e0dfc7

View File

@@ -11,7 +11,7 @@ unbind %
# enable mouse control (click wind, panes, resizable panes) - as of tmux 2.1
# copy/paste: shift+left click to highlight, then shift+middle to past
set -g mouse on
#set -g mouse on
# stop tmux from renaming the window every time you run a command
set-option -g allow-rename off
@@ -29,3 +29,7 @@ set -g base-index 1
# set vi modes
set -g status-keys vi
set -g mode-keys vi
if-shell '[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]' \
'set -g mouse on; set -g mouse-utf8 on' \
'set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on'