From: Oleg Broytman Date: Sat, 8 Apr 2017 22:40:20 +0000 (+0300) Subject: .tmux.conf: exchange tmux copy buffer with X clipboard X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=7ae608fc1103371b8fa72fb027fb8206c25e9a15;p=dotfiles.git .tmux.conf: exchange tmux copy buffer with X clipboard --- 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"