I figured I’d also add a bit of text about why I’m using wl-paste and clipman above, for anyone interested in clipboard management.
So, the specific problem I’m trying to solve with this daemon: On Windows and (traditional, dunno if this has changed, decades out-of-date on MacOS) MacOS, the desktop environment maintains a persistent clipboard buffer. When you hit Control-C (or, on MacOS, Command-C), the program tells the OS to save a copy of the copied/cut content.
This is not actually what X11 or Wayland do. Neither X11 nor Wayland maintain a persistent clipboard. What they do is act as a broker between two X11 or Wayland programs. So, if you you launch Program A and select text (for PRIMARY) or hit Copy (for CLIPBOARD) and then in Program B, middle-click (for PRIMARY) or hit Paste (for CLIPBOARD), then Wayland tells Program B to go get data from Program A.
For X11, this was particularly important in that the system was designed to run on very low-resource thin terminals. That terminal may not have the ability to store a whole lot of clipboard data.
This becomes user-visible If someone closes Program A prior to pasting in Program B, because their content also disappears.
Some people found this obnoxious, and introduced a solution many years back, reusing an approach used by software on Windows and MacOS to solve a different issue.
On both Windows and MacOS, some people ran into the limitations of having a single clipboard. They didn’t want a “copy” to destroy whatever was already in their clipboard, wanted a history.
Some software packages dealt with this – I believe Microsoft Office was among these – by introducing its own “clipboard history”. Emacs has its own sophisticated system with a history, the kill-ring, that’s been extended in all kinds of exotic ways (e.g. to be a “kill-torus”). But while these mitigate the problem for a particular important program, these are not system-wide.
So what folks on MacOS and Windows did was introduce “clipboard managers”. The idea here is that you have a very small, simple program. It just sits and waits for the clipboard contents to change. When they do, it saves a copy. It typically saves some finite number of clipboard entries, and lets you go back in a time-ordered list and choose saved clipboard contents. Some provide more-sophisticated functionality, like searching through history. That’s nice if you just chose “copy” and realize that you just blew away some content that you’d copied. Based on a quick glance, neither MacOS nor Windows ships out-of-box with a clipboard manager in the base OS in 2024, but it’s a simple program to write, so people who want it don’t have trouble adding it on.
X11 has three clipboards (PRIMARY, SECONDARY, CLIPBOARD) and Wayland can do at least PRIMARY and CLIPBOARD, dunno about SECONDARY. That’s a bit more state that can be retained, but they aren’t really intended to provide a “history”.
Some people on X11 or Wayland also want that “clipboard manager” functionality. And a “clipboard manager” also has the nice side-benefit of providing clipboard persistence beyond the lifetime of the program from which you copied the data. You don’t have the “Program A was closed before pasting to Program B” issue, because what happens is that you copy in Program A, then the clipboard manager detects that the clipboard contents have changed and internally transfers the clipboard contents from Program A to its own memory, then announces that it has new clipboard contents, a copy of what was just stored, so when the user pastes in Program B, he’s actually asking the clipboard manager to send data to Program B. I don’t actually know how fast the clipboard managers detect new data in the clipboard – depending upon how the clipboard API works, I suppose that there might be a window for data loss, where someone copies in Program A and then immediately closes Program A – but it seems to work well-enough on a day-to-day basis.
This is particularly obnoxious for software packages like xsel on X11 and wl-clipboard on Wayland. They’re command-line programs that you can use to “copy” text. They need to provide the appearance to the user of looking like any other command-line program and exiting once they’ve run. But the X11 and Wayland protocols don’t permit for that – a program from which one is copying data has to stay alive long enough to send data to whatever program is requesting it. So xsel and wl-clipboard have to fork off a process to stay alive until the clipboard contents change, which is kind of a kludge.
I don’t personally need a clipboard manager. I don’t care about a clip history. I use emacs’ kill ring, but the overwhelming remainder of copy-pasting I do is very simple. And my experience has been that clipboard managers tend to come-and-go, and tend to be tied to a particular desktop environment or widget toolkit, and come with a bunch of library dependencies.
What I do want, though, is clip persistence past the lifetime of a given program. I don’t like having to think about whether a program is still running or not. I want the clipboard to act like my X11 server or or Wayland contains an independent clip buffer, and when I choose “copy”, it saves a copy to the thing.
The combination of clipman plus wl-paste --watch can be made to act as a very minimalist clipboard manager. It doesn’t use KDE or GNOME or GTK or Qt or anything like that. All it does is talk directly to Wayland. That fits my bill well. Note that it does store a copy of the clipboard on-disk, which some people may want (so that it lasts across sessions, which I don’t care about). That’s necessary because wl-paste doesn’t retain state and clipman doesn’t stay running. Some people may not like this in that they may not want clipboard contents sitting around on disk from session to session; stuff like passwords might be persisted there; just a heads-up. There are clipboard managers out there that won’t persist state to disk, if that’s a concern for anyone.
Trademarks should be good as long as the company is in business.
Patents should be determined by weighing two factors: 1) how much sooner will the invention be produced than it would have been without the incentive of a patent, and how much will the public benefit from that earlier introduction; and 2) how much will the public be harmed by the monopoly resulting from the patent? The patent should then expire before the second factor outweighs the first.
Copyrights have been a scam since they were first introduced: the original intention (when printing was first introduced) was to police the printing of politically or morally objectionable works, but the authority appointed to do so abused the power to sell monopolies on printing specific works. Authors were originally opposed to this practice, and actually got it overturned for a time—the idea that copyrights are needed so publishers can compensate authors was a post-hoc justification publishers came up with to get authors to withdraw their objections. But it’s never been a good deal for the actual creators.
So copyright needs to be re-thought from the ground up—the amount of time that works remain under copyright is a secondary issue.
I’d be fine with copyright going away altogether. People sometimes object to this on the grounds of “But Disney will just steal your ideas and make money off of them”. If their works don’t have copyright though, you can do the same right back to them.
This is also one reason that I appreciate generative AI. Short-term, yes it will help Disney and the like. Slightly longer-term, why would anyone give Disney money if you can generate your own Marvel movie yourself?
The genie also isn’t going back in the bottle. Copyright is a dead man walking. If you dislike what large companies like Disney are doing/going to do with generative AI, push for anyone training a model to be forced to let anyone whose work went into that model for free.
Yeah, “generating your own Marvel movie” was considered high art for most human cultures before copyright: from traditional epics to Greek dramas and even Shakespeare’s “serious” plays, audiences were already familiar with the characters and stories and valued the art of the re-telling. Novels (so-called because the characters and stories were “new”) were considered low-brow trash for people unfamiliar with the myths and stories that “real” literature was based on.
Now, that primal human urge to build on and re-tell familiar stories is relegated to unlicensed fan-fiction and to franchises like Marvel who only permit certain sanctioned creators to build on their “property”.
Quickly skimming Wikipedia Orthopoda (now synonymous to Ornithischia, bird hips) was coined in 1866. Birds from dinosaurs as an idea kinda gain traction during 1868. It was during 1870s when the famous full Archaeopteryx fossil was found is when it really get cemented. Missed it just by a few years.
That’s cellular respiration! The mitochondria, THE POWERHOUSE OF ALL CELLS EVERYWHERE, does that one! It’s the one that keeps life living. 3 ADP -> 2 ATP iirc.
Don’t worry, you’re still serving an important role in the economy!
As part of the “reserve army of labor”, by your very existence you drive down the wages of other workers in your field, based on the threat that they could be replaced with you.
kbin.life
Oldest