4 ms·
On Mac, you can pipe input into pbcopy to add it to your clipboard. cat file.txt | pbcopy This adds the contents of file.txt to your clipboard.
by birbs 5y ago
On Mac, you can pipe input into pbcopy to add it to your clipboard.
cat file.txt | pbcopy
This adds the contents of file.txt to your clipboard.
- kristopolous 5y agotmux has its own clipboard but this give me an idea. (linux's equivalent here is xclip btw)
- yjftsjthsd-h 5y agohttps://wiki.archlinux.org/title/Tmux#X_clipboard_integration https://wiki.archlinux.org/title/Tmux#X_clipboard_integratio... suggests preferring xsel
- kristopolous 5y agoThanks for that. Disabling copy-on-select is really in my mind, priority #1 along with not having multiple clipboards I have to pass things between. It's insane that it's still broken. It's Xorg's equivalent to Firefox's crazy 20 year long ctrl-q drama. What could they do instead? There's so many trivial solutions. A clipboard named pipe for instance, or at least something that operates like one. Read is paste, write is copy. That's a very 1970 style fix that could have been done 35 years ago. Then anything that can read and write from a file can interface the clipboard, opening up a whole new array of applications without setting aside "highlighting text" as having some special magical power. Also having multiple clipboards is trivial, just have more of these special files. You can even set one aside if say some crazy old Xt application someone is still running only works with copy-on-select for some reason A clipboard history is super trivial as well, just set up a pipe... There's so many more unixy ways this could have been done. It's so dumb how it works. Heck dbus would be a less insane fix
- yosamino 5y ago> Disabling copy-on-select is really in my mind, priority #1 reading yoru entirely comment, I am not entirely sure if you mean changing how it's implemented or if you really would like to get rid of the user interface it has. Because copy-on-select along with middle-click-to-paste is like ... the best thing. Tiny bits of data stuck that follow your cursor is the most information-at-my-fingertip feeling that I can get out of these machines.
- kristopolous 5y agoHow do you use computers? I've hated this feature for 25 years. I run up against the design flaws of this limitation alone usually multiple times a day. From websites that try to have some funky JavaScript convenience (including nearly impossible to use things like medium) to applications that want to select the entire thing and destroy the clipboard as I'm trying to put something in. UX limitations and bad design make it utterly useless constantly. The whole paradigm is broken. From applications that just select the entire document when you're one pixel off the line of selection, as if anyone has ever asked for that, to application interoperability with anything more than text, parity with windows OLE from around 1993, being still a total pipe dream. Drag and drop is still totally dependent on what toolkit the two programs you're using was written in. That's nonsense! It'd be like a world where I can't pipe say output from python as input to a bash script because they were implemented in different languages and people would be like "welp. That sounds right. I don't see a problem here" Also the world of programmers have decided they can go around randomly selecting shit to try to make my life dealing with clipboards easier even though it just makes it utterly unusable. I'm not going to go on a crusade to personally win that fight on a program by program basis. It'd be so much better to have flexibility on how clipboards work Things could be amazing but instead we defend it being terrible. Here's an example. Imagine where I can not only do basic asks like drag from inkscape to figma but also have something I'll call a "transport station" where I can drag things into a dock to share them with colleagues who can receive them and then put it into their application of choice, in a non-destructive, non-disruptive way that maintains the flow of productivity. Sound like a smooth and fantastic collaboration tool? I agree. I've tried to make this, there's lots of fundamental problems that ought not exist. That's the power an unbroken clipboard could have. What do you do with computers where you don't viscerally feel these limitations daily?
- lf-non 5y agowl-clipboard [1] provides similar wl-copy & wl-paste for wayland [1] https://github.com/bugaevc/wl-clipboard https://github.com/bugaevc/wl-clipboard