I've been fairly happily using Ctrl-C/Ctrl-V, with the occasional Ctrl-Ins/Shift-Ins here and there on Linux for quite some time, but I've recently switched over to urxvt
and am finding the clipboard interaction situation pretty intolerable.
I would simply switch back to another emulator, but I'd rather have a go at solving this first.
Right now, I'm using autocutsel
to sync CLIPBOARD and PRIMARY, but while this works well for copying text from urxvt to most other apps, it generally degrades the overall usefulness of the clipboard because it gets accidentally overwritten any time I select text anywhere.
The ideal solution would be to disable the PRIMARY "copy on select" behavior system-wide but Googling hasn't found me a solution. This question discusses it, but sadly remains unanswered.
To summarize, desired behavior:
- urxvt
- selection: no-op
- Ctrl-Ins: copies to PRIMARY (
autocutsel
syncs to CLIPBOARD) Shift-Ins: pastes from PRIMARY
elsewhere
- selection: no-op
- Ctrl-C: copies to CLIPBOARD (
autocutsel
syncs to PRIMARY) - Ctrl-V: pastes from CLIPBOARD
NOTE: Please let me know if I'm misunderstanding either what Ctrl-Ins/Shift-Ins do or how autocutsel
works.
EXTRA NOTE: There is another similar question that's been answered here but that is about doing exactly the opposite (disabling CLIPBOARD) which will result in copying being implicit rather than explicit; as it says in that answer:
You can ignore PRIMARY if you want (but note that some older applications like xterm may only support PRIMARY
So the specific problem here is (a) supporting the modern explicitly populated CLIPBOARD while (b) still retaining access clipped contents from older applications