diff --git a/tmux.conf b/tmux.conf index 4a73077..f229429 100644 --- a/tmux.conf +++ b/tmux.conf @@ -153,6 +153,10 @@ if-shell 'command -v pbcopy >/dev/null' \ bind-key -Tcopy-mode-vi Escape send -X cancel # cancel v mode bind-key -Tcopy-mode-vi ^v send -X rectangle-toggle # cancel v mode +# Wheel: stock tmux scrolls 5 lines per tick, too fast on a trackpad (one flick = +# dozens of ticks). Halved to 2; applies to history scrolling (copy-mode) only. +bind -T copy-mode-vi WheelUpPane select-pane \; send-keys -X -N 2 scroll-up +bind -T copy-mode-vi WheelDownPane select-pane \; send-keys -X -N 2 scroll-down bind-key -T copy-mode-vi MouseDown1Pane select-pane -t = \; send-keys -X clear-selection bind-key -T copy-mode-vi MouseUp1Pane select-pane -t = \; send-keys -X cancel bind -n MouseDrag1Pane if -Ft= '#{mouse_any_flag}' 'if -Ft= \"#{pane_in_mode}\" \"copy-mode -eM\" \"send-keys -M\"' 'copy-mode -eM'