detect old or new tmux mouse support and use proper options accordingly

This commit is contained in:
Gregory Pakosz 2015-09-17 22:16:29 +02:00
parent 300dc1d069
commit 5133275e15
1 changed files with 25 additions and 8 deletions

View File

@ -303,6 +303,22 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
# }
#
# toggle_mouse() {
# if (tmux show -g -w |grep -q mode-mouse); then
# old=$(tmux show -g -w | grep mode-mouse | cut -d' ' -f2)
# new=""
#
# if [ "$old" = "on" ] ; then
# new="off"
# else
# new="on"
# fi
#
# tmux set -g mode-mouse $new \;\
# set -g mouse-resize-pane $new \;\
# set -g mouse-select-pane $new \;\
# set -g mouse-select-window $new \;\
# display "mouse: $new"
# else
# old=$(tmux show -g | grep mouse | head -n 1 | cut -d' ' -f2)
# new=""
#
@ -314,6 +330,7 @@ run 'for name in $(printenv | grep -Eo ^tmux_conf_[^=]+); do tmux setenv -gu $na
#
# tmux set -g mouse $new \;\
# display "mouse: $new"
# fi
# }
#
# battery() {