From 48b2e1e7bfd684a0c09dea70d6e6a9fd700a71a8 Mon Sep 17 00:00:00 2001 From: Olof-Joachim Frahm Date: Thu, 12 Feb 2015 15:51:26 +0100 Subject: [PATCH] Elaborate more on the copying part. --- x11-clipboard.post | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/x11-clipboard.post b/x11-clipboard.post index 4c6f264..51b4143 100644 --- a/x11-clipboard.post +++ b/x11-clipboard.post @@ -15,6 +15,17 @@ exchanges clipboard and primary selection, so no more awkward pasting and selecting with the mouse in order to get the correct string in the correct location. + # to switch clipboard and primary selection + PRIMARY=`xsel -op`; xsel -ob | xsel -ip; echo "$PRIMARY" | xsel -ib + + # to paste from primary selection in tmux + bind p run "tmux set-buffer \"$(xsel -op)\"; tmux paste-buffer + +Other useful keybindings in tmux would copying into the clipboard etc. and +there is a useful [SO +post](https://unix.stackexchange.com/questions/77355/tmux-xclip-copy-no-longer-working/77587#77587) +explaning that. + As before this is public at the [customisations](https://github.com/Ferada/dwm/tree/customisations) branch on Github; I still have to upload the tmux part though. -- 1.7.10.4