Skip to content

Instantly share code, notes, and snippets.

@Morley93
Created April 2, 2017 16:04
Show Gist options
  • Save Morley93/c1bc80b6c2145363718b7e42124fe84a to your computer and use it in GitHub Desktop.
Save Morley93/c1bc80b6c2145363718b7e42124fe84a to your computer and use it in GitHub Desktop.
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