From 7ae608fc1103371b8fa72fb027fb8206c25e9a15 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sun, 9 Apr 2017 01:40:20 +0300 Subject: [PATCH] .tmux.conf: exchange tmux copy buffer with X clipboard --- .tmux.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.tmux.conf b/.tmux.conf index ae1849a..fe4827c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -83,3 +83,10 @@ bind L resize-pane -R 10 # Use vertical and horizontal chars to split the screen bind-key | split-window -h bind-key - split-window -v + +# Copy tmux copy buffer to X clipboard +# bind C-y run "tmux save-buffer - | xclip -i" +bind C-p copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b" +# Copy X clipboard to tmux paste buffer +# bind C-p run "xclip -o | tmux load-buffer -; tmux paste-buffer" +bind C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer" -- 2.39.5