sindresorhus/clipboardy

Fallback to xclip

Closed this issue · 3 comments

On GNU+Linux, there are two common programs for clipboard access. xsel is already implemented, but xclip could be as well. If ran without any flags, it accepts stdin and writes it to the clipboard buffer. If passed in -o, it outputs the clipboard buffer to stdout.

https://qa.debian.org/popcon.php?package=xclip
https://qa.debian.org/popcon.php?package=xsel

They have almost the same amount of installs on popcon!

Yes, I intended to open an issue about this actually. I had problems getting xclip to work when spawned. It stalled forever until I copied something while it was running. Happy to take a pull request for this though.


I also wish there was something I could bundle on Linux to make copying just work. It's sub-optimal to not just work out of the box...

@sindresorhus Yeah I absolutely intended to implement this! I've just been a bit busy. About the "just working", xclip is an incredibly tiny program and we could make an optional pre-built dependency for it if you wanted.

@misterhat That would be awesome :)