From my understanding, under X11 we have basically 2 ways to copy and paste stuff: the PRIMARY selection and the CLIPBOARD selection. Explicitly copying something with ctrl-c will utilize the clipboard selection and there are many applications that may manage your clipboard for you.
But what I'm interested in is altering the PRIMARY selection behavior, in particular I wish to make X11 stop automatically copying selected text to the primary selection. My end goal is to be able to select text with my mouse and then middle-click with my mouse-wheel if I wish to copy it (or cut it if its easier to implement). I basically want to implement an extra step to copy stuff into PRIMARY.
I would also like to be able to paste this recently copied text by middle-clicking again the mouse. This is the default behavior for pasting the PRIMARY selection, so this should just work if we use the PRIMARY selection to copy stuff. (But if we somehow could remap everything to use CLIPBOARD we would gain the ability to paste images which I believe is impossible to do with PRIMARY)
What is the best way to accomplish this? Is this a xorg setting? Should I completely disable the PRIMARY selection and use some sort of keybinding application to implement this behavior with the CLIPBOARD selection? Is there a clipboard manager that can do this for me? I'm currently using Klipper, the clipboard manager that comes with KDE/plasma and this doesn't seem to be an option there.
translations
resource of course is specific to X Toolkit. The answer which you linked to doesn't mention that detail, but at the end where it says "Most Gtk applications ignore X resources," that's incorrect. Which resources they use depends on the libraries (hint:Xft
is a library), but they all use *some* X resources. – Thomas Dickey Apr 13 '21 at 23:05