Better Copy Paste in X

6/19/2023

To achieve 1) a single global cutbuffer accessed by both ctrl-c/ctrl-v and highlight/middle mouse (synced CLIPBOARD and PRIMARY) and 2) the persistence of the selection after the source window closes, you can use autocutsel and clipit simultaneously.

Running

autocutsel -s CLIPBOARD &
autocutsel -p PRIMARY &

will synchronize CLIPBOARD and PRIMARY, while

clipit -d &

persists selections.

I also prefer to store bit of my selection history, so my .xinitrc contains a line for clipmenud as well.