Created
May 19, 2020 12:30
-
-
Save michelbl/e5d1caa32fc12bb1b961b924b84df538 to your computer and use it in GitHub Desktop.
Configuration to use mouse and copy/paste with tmux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Beforehand, to make it work with SSH you'll have to: | |
# * install xsel and xauth on target host | |
# * set X11Forwarding=yes in /etc/ssh/sshd_config | |
# * connect with option "-X" | |
# * on Mac, install XQuartz | |
# | |
# Test with "echo $DISPLAY", that variable should be set on the server | |
# tmux version 1.6 | |
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 | |
bind C-c run "tmux save-buffer - | xsel -ib" | |
bind C-v run "xsel -ob | tmux load-buffer - ; tmux paste-buffer" | |
# tmux version 2.x | |
set -g mouse on | |
bind C-c run "tmux save-buffer - | xsel -ib" | |
bind C-v run "xsel -ob | tmux load-buffer - ; tmux paste-buffer" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment