2 releases
Uses new Rust 2024
| 0.2.9 | Feb 6, 2026 |
|---|---|
| 0.2.8 | Feb 6, 2026 |
#12 in #bridge
23KB
83 lines
copy-rs
Cross-platform (GNU/Linux and MacOS) CLI copy command.
Usage
To use, simply pipe any content you want into the copy command. Example:
cat /etc/resolv.conf | copy
Due to limitations of the way the clipboard works on GNU/Linux, the copy process
will block for 60 seconds while you paste the contents somewhere. After that,
the copied material will be unavailable for pasting. On MacOS, it does not block
and there's no time limit.
Installation
Currently, only installation from source is supported.
- Clone this repo
- Install X dev package packages:
- Alpine
$ apk add \ cargo \ libxcb-dev \ python3 - Ubuntu:
# apt-get install \ xorg-dev \ libxcb-render0-dev \ libxcb-shape0-dev \ libxcb-xfixes0-dev
- Run
cargo build --release - Copy the resulting binary to wherever you prefer:
sudo cp target/release/copy /usr/local/bin
Dependencies
~1–10MB
~218K SLoC