aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.config/tmux/linux.conf
blob: ed4800a7ee149dade7fa488df5a6acddc26c588a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Depends on xsel.

# The simple
#
#     xsel -i --clipboard
#
# doesn't work, but
#
#     xsel -i -p && xsel -o -p | xsel -i -b
#
# does[1]. How fun!

bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'
bind-key -T copy-mode-vi Y send-keys -X copy-pipe-and-cancel 'tmux paste-buffer'
bind-key -T copy-mode-vi M-y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b; tmux paste-buffer'
bind-key -T copy-mode-vi '!' send-keys -X copy-pipe-and-cancel "tr -d '\n' | xsel -i -p && xsel -o -p | xsel -i -b"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'
bind-key -T root MouseDown2Pane run 'xsel -o | tmux load-buffer - && tmux paste-buffer'
bind-key ] run 'xsel -o | tmux load-buffer - && tmux paste-buffer'