|
|
|
|
|
by philh
5813 days ago
|
|
X11 actually maintains three separate cut/paste buffers - primary (which you access with select/middle click), secondary and clipboard. Ctrl-C/Ctrl-V are probably interfacing with the X11 clipboard, not a distinct Gnome clipboard. (Though I don't use Gnome myself, so I can't check.) You could probably write a daemon to keep the primary selection empty. The `xsel` program would be a good place to start. I thought you could do it with `while true; do echo -n '' | xsel -n -i; done`, but it quits immediately if the input is empty so that would be constantly executing a new program. Still, I expect there's some trickery you could do with it, or you could look at how it's implemented and copy that. (edit - or to eliminate a lot of the pain, while true; do echo -n ' ' | xsel -n -i; done
will keep a space permanently in the selection. I tested and it seemed to work, though there may be edge cases I'm not aware of.) |
|
The major advantage this has over the X11 clipboard, IMO, is that text persists after its source application is closed.