https://github.com/jabbalaci/jabba-ctc
Copies its argument (as text) to the clipboard.
https://github.com/jabbalaci/jabba-ctc
argument clipboard
Last synced: about 1 year ago
JSON representation
Copies its argument (as text) to the clipboard.
- Host: GitHub
- URL: https://github.com/jabbalaci/jabba-ctc
- Owner: jabbalaci
- License: mit
- Created: 2022-07-30T11:43:33.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-19T17:38:54.000Z (over 3 years ago)
- Last Synced: 2025-03-02T00:13:55.485Z (over 1 year ago)
- Topics: argument, clipboard
- Language: Rust
- Homepage: https://crates.io/crates/jabba-ctc
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jabba-ctc
The name "ctc" stands for _**c**opy **t**ext to **c**lipboard_. This is a binary crate.
`ctc` can copy its argument (as text) to the clipboard OR it can
copy the content of a text file to the clipboard.
```
$ ctc --help
ctc (copy text to clipboard) v0.1.1
Usage examples:
* ctc print help
* ctc -h, ctc --help print help
* ctc copy the given text to clipboard
* ctc -f copy the content of the given file to clipboard
```
Supported platforms: Windows and Linux (with X server).
## Windows
Put `ctc.exe` to a folder that is in your PATH.
Example:
```
c:\> ctc hello.txt
```
Now the text "**hello.txt**" is copied to the clipboard.
## Linux
`ctc` relies on the external command `xsel` to manipulate the content of the clipboard.
Thus, you must install `xsel` using your package manager (under Ubuntu it's
`sudo apt install xsel`).
Under Linux, there are two clipboards. They are called "primary" and "clipboard". `ctc`
puts the text on both of them, thus you can insert the text with one of the following
methods: Ctrl+v, Shift+Insert, or mouse middle click.
See the example above, it works similarly under Linux.
## Installation
`ctc` is written in Rust. If you have the Rust compiler, you can install it directly
from crates.io using the command `cargo`:
$ cargo install jabba-ctc
## Links
* [jabba-cpc](https://github.com/jabbalaci/jabba-cpc): **c**opy **p**ath to **c**lipboard
* [go-cpc-ctc](https://github.com/jabbalaci/go-cpc-ctc): a Go implementation of cpc and ctc