Skip to content

Instantly share code, notes, and snippets.

@MannyKayy
Forked from joar/.tmux.conf
Created August 20, 2020 19:14
Show Gist options
  • Save MannyKayy/9e111fdaf60b8f5e675afeb960b955fc to your computer and use it in GitHub Desktop.
Save MannyKayy/9e111fdaf60b8f5e675afeb960b955fc to your computer and use it in GitHub Desktop.
tmux: Enable mouse scrolling, windown and pane select. Also provides a binding to disable/enable mouse for copy/pase.
# mouse-mode
set-window-option -g mode-mouse on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
# toggle mouse mode to allow mouse copy/paste
# set mouse on with prefix m
bind m \
set -g mode-mouse on \;\
set -g mouse-resize-pane on \;\
set -g mouse-select-pane on \;\
set -g mouse-select-window on \;\
display 'Mouse: ON'
# set mouse off with prefix M
bind M \
set -g mode-mouse off \;\
set -g mouse-resize-pane off \;\
set -g mouse-select-pane off \;\
set -g mouse-select-window off \;\
display 'Mouse: OFF'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment