diff options
Diffstat (limited to '%HOME%/.config/tmux')
-rw-r--r-- | %HOME%/.config/tmux/cygwin.conf | 7 | ||||
-rw-r--r-- | %HOME%/.config/tmux/linux.conf | 19 | ||||
-rw-r--r-- | %HOME%/.config/tmux/macos.conf | 7 |
3 files changed, 33 insertions, 0 deletions
diff --git a/%HOME%/.config/tmux/cygwin.conf b/%HOME%/.config/tmux/cygwin.conf new file mode 100644 index 0000000..3c9f14a --- /dev/null +++ b/%HOME%/.config/tmux/cygwin.conf @@ -0,0 +1,7 @@ +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'cat > /dev/clipboard' +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 'cat > /dev/clipboard; tmux paste-buffer' +bind-key -T copy-mode-vi '!' send-keys -X copy-pipe-and-cancel "tr -d '\n' > /dev/clipboard" +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'cat > /dev/clipboard' +bind-key -T root MouseDown2Pane run 'cat /dev/clipboard | tmux load-buffer - && tmux paste-buffer' +bind-key ] run 'cat /dev/clipboard | tmux load-buffer - && tmux paste-buffer' diff --git a/%HOME%/.config/tmux/linux.conf b/%HOME%/.config/tmux/linux.conf new file mode 100644 index 0000000..ed4800a --- /dev/null +++ b/%HOME%/.config/tmux/linux.conf @@ -0,0 +1,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' diff --git a/%HOME%/.config/tmux/macos.conf b/%HOME%/.config/tmux/macos.conf new file mode 100644 index 0000000..abbe020 --- /dev/null +++ b/%HOME%/.config/tmux/macos.conf @@ -0,0 +1,7 @@ +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy' +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 'pbpaste; tmux paste-buff' +bind-key -T copy-mode-vi '!' send-keys -X copy-pipe-and-cancel "tr -d '\n' | pbcopy" +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy' +bind-key -T root MouseDown2Pane run 'pbpaste | tmux load-buffer - && tmux paste-buffer' +bind-key ] run 'pbpaste | tmux load-buffer - && tmux paste-buffer' |