2 ms·
+1. Scrollback used to be one of my gripes as well, but it now works well under tmux. I like to have a single key binding to toggle mouse on/off, so I found a
by guiambros 11y ago
+1. Scrollback used to be one of my gripes as well, but it now works well under tmux.
I like to have a single key binding to toggle mouse on/off, so I found a clever (although hacky) way reading someone's .tmux.conf, and have used it ever since:
# toggle mouse
bind m run "cut -c3- ~/.tmux.conf | sh -s toggle_mouse"
# toggle_mouse() {
# 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"
# }