I just realized that the promise of ipv6 will create a demand for good clipboard integration in console applications! Imagine the very long ipv6 addresses that many Unix/Linux admins will have to move from spreadsheets into configuration text files!
Therefore I propose that we start thinking about a libclipboard library. As a pragmatic bridging solution we could easily make a small DBus service that not converts but bridges the target requests to the x11 clipboard owner. This service would just play as a proxy rather than something that collects and harvests x11 clipboard targets (the x11 clipboard supports requesting the owner to convert to a desired format, getting a list of available formats, etc – called targets -).
Meanwhile we could let console applications finally enjoy a decent clipboard that can actually make it possible for a console application to request multiple formats. Sounds better than xterm hacks to me.
Before continuing with reading, do this in your mind:
If you are a religious vim user:
export EDITOR=vim
If you are a religious Emacs user:
export EDITOR="killall -9 vim; emacs"
Examples:
- Select text in Firefox, paste as HTML source in $EDITOR
- Select two columns and twenty rows in a spreadsheet application, and paste as a comma separated list in $EDITOR
Maybe even have an easy to configure filter application that on-the-fly converts just a copy source into a format that the admin wants in his configuration text file. You know how management always delivers things like IP addresses in spreadsheet format (it’s just a silly example, really).
We could also let such a library solve the problem of two applications running on the same computer being displayed on a remote X11 server having to transfer large clipboards over the X11 protocol (over the wire).
I still think PRIMARY and SECONDARY are broken concepts by design. But I also agree that this is subjective (but really, let’s be honest about it, it’s broken. Seriously).
Of course I realize that whether or not I’m right about such a solution only depends on somebody (like me) doing it rather than just blogging about it. I have always been tempted to try to start something. Who knows someday I will?