diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-02-09 10:09:15 +0000 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-02-09 10:09:15 +0000 |
commit | 68ad145b3884158a0fc04f0c506e11c12dd43a18 (patch) | |
tree | be1cd8193db4b1d31fe403ea1bab387db76b363e /%HOME%/.config/tmux | |
parent | ssh: update my hosts (diff) | |
download | linux-home-68ad145b3884158a0fc04f0c506e11c12dd43a18.tar.gz linux-home-68ad145b3884158a0fc04f0c506e11c12dd43a18.zip |
tmux: split some config parts into multiple parts
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' |