petdance / altbox

Website for altbox.dev, the alternative toolbox for developers
https://altbox.dev/
48 stars 1 forks source link

Look at Clipboard #111

Open Slackadays opened 1 year ago

Slackadays commented 1 year ago

I just discovered altbox and it looks really interesting. From my initial browsing, you've got a lot of "modern UNIX" tools like bat and exa and all those others. Therefore, I propose that you also look at Clipboard, a modern UNIX project of mine that I like to call a "power tool" which just so happens to match with what the website banner says. :) I don't know if there are any specific requirements to be included into altbox, so this is just my initial suggestion here.

petdance commented 1 year ago

Please add a link.

Slackadays commented 1 year ago

https://github.com/Slackadays/clipboard

petdance commented 1 year ago

This clipboard is only in the shell, right? It's not tied to the clipboard in your host machine?

What makes cb better/different than just dumping stuff to /tmp/filename.txt or whatever?

Slackadays commented 1 year ago

This clipboard is only in the shell, right? It's not tied to the clipboard in your host machine?

CB lives entirely in the terminal, and to my knowledge, it's also the only such terminal-based clipboard manager that isn't completely bare bones like xclip or wl-copy. It is also the only way currently to achieve a true filesystem-based clipboard storage system, with Plan9 being the only other thing that treats "the clipboard" as a file. That lets it be 100% independent of the system clipboard, but because nearly all of us are still married to regular system clipboards for many tasks, CB has backends to provide compatibility with most of them.

What makes cb better/different than just dumping stuff to /tmp/filename.txt or whatever?

I think the whole point of not dumping stuff to /tmp/filename.txt is that you don't have to. CB lets you copy multiple files and/or directories or data completely transparently, so you don't have to make multiple temporary files and directories just to store them in. And if you want them to stick around, now you have to find a good spot to keep them and hope you remember it or else. Finally, if you want to store multiple different temp containers, that's going to get messy and even harder to remember really quickly, while CB "just knows" everything like a computer should. This also means you can make elaborate scripts that do certain things for your workflow, because CB is really scriptable by design.