# tmux < 2.4 copy-mode key table (vi-copy, old -t flag) and mouse-wheel/ # PageUp passthrough. Sourced conditionally from tmux.conf; see # tmux/modern.conf for tmux >= 2.4. bind-key -t vi-copy PPage page-up bind-key -t vi-copy NPage page-down # Mouse wheel scrolls 4 lines per tick, not tmux's half-page default (20 lines # in a 40-line pane). Old bind-key has no -N; -R is the equivalent repeat # count for keys in the copy-mode tables. bind-key -R 4 -t vi-copy WheelUpPane scroll-up bind-key -R 4 -t vi-copy WheelDownPane scroll-down bind-key -t vi-copy v begin-selection bind-key -t vi-copy y copy-pipe "$HOME/dotfiles/bin/clipboard-copy" unbind-key -t vi-copy Enter bind-key -t vi-copy Enter copy-pipe "$HOME/dotfiles/bin/clipboard-copy" bind-key -n PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage" bind-key -n WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M" bind-key -n WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"