Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
tmux mouse configuration
# Mouse settings
set -g mouse on
# Scroll faster than line-by-line
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" \
"send-keys -M; send-keys -M; send-keys -M; send-keys -M" \
"if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' \
'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
bind -n WheelDownPane if-shell -F -t = "#{mouse_any_flag}" \
"send-keys -M; send-keys -M; send-keys -M; send-keys -M" \
"if -Ft= '#{pane_in_mode}' 'send-keys -M; send-keys -M; send-keys -M; send-keys -M' \
'copy-mode -e; send-keys -M; send-keys -M; send-keys -M; send-keys -M'"
bind-key -t vi-copy MouseDragEnd1Pane copy-pipe "xclip -sel clip -i >/dev/null"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment