aboutsummaryrefslogtreecommitdiffstats
path: root/.tmux.conf
diff options
context:
space:
mode:
authorDavid Runge <david.runge@native-instruments.de>2018-04-23 08:37:04 +0200
committerDavid Runge <david.runge@native-instruments.de>2018-04-23 08:37:04 +0200
commitea4515f490085e6a806ecb12e6d33728ce9edaee (patch)
tree88238f2fa21ce5d92e485551630c8197590192e6 /.tmux.conf
parent321047fd2d6da1c3b3260e2a89d1e6c2377cb534 (diff)
downloaddotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.gz
dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.bz2
dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.tar.xz
dotfiles-ea4515f490085e6a806ecb12e6d33728ce9edaee.zip
bin/clipboard-wrapper: Adding script to wrap macOS and Linux/X11 specific clipboard systems (to be able to copy from tmux by selection, etc.).
Diffstat (limited to '.tmux.conf')
-rw-r--r--.tmux.conf10
1 files changed, 7 insertions, 3 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 16c3173..2ea510c 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -62,9 +62,13 @@ setw -g mode-keys vi
bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send -X copy-selection
# clipboard settings
-set -s set-clipboard on
-bind-key C-p run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
-bind-key C-y run "tmux save-buffer - | xclip -i"
+set-option -s set-clipboard off
+# mouse selection gets copied to system clipboard
+bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "~/bin/clipboard-wrapper -i"
+# visual selection gets copied to system clipboard
+bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "~/bin/clipboard-wrapper -i"
+# paste (doesn't do anything yet)
+bind-key -T copy-mode-vi p run "~/bin/clipboard-wrapper -o | tmux load-buffer - ; tmux paste-buffer"
# set first window to index 1 (not 0) to map more to the keyboard layout...
set -g base-index 1