From 03ec982a50352f760673f1393bada7fcb88b38df Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sun, 9 Jul 2017 09:23:24 +0200 Subject: [PATCH] simplified _toggle_mouse() implementation --- .tmux.conf | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index be2cecd..cd00df3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -215,34 +215,17 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # } # # _toggle_mouse() { -# if tmux show -g -w | grep -q mode-mouse; then -# old=$(tmux show -g -w | grep mode-mouse | cut -d' ' -f2) -# new="" +# old=$(tmux show -gv mouse) +# 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" +# if [ "$old" = "on" ]; then +# new="off" # else -# old=$(tmux show -g | grep mouse | head -n 1 | cut -d' ' -f2) -# new="" -# -# if [ "$old" = "on" ]; then -# new="off" -# else -# new="on" -# fi -# -# tmux set -g mouse $new \;\ -# display "mouse: $new" +# new="on" # fi +# +# tmux set -g mouse $new \;\ +# display "mouse: $new" # } # # _battery() {