- Scheme 74.5%
- Nix 25.5%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| main.scm | ||
| README.md | ||
rofi-copyright
Small clipboard processing utility, featuring some useful-ish helpers to process copied text.
Warning
This is written entirely as a scheme language-learning project. Don't be surprised if it is poorly formatted, inefficient, incompatible with your system, full of vulnerabilities or if it eats all of your pancakes.
Usage
Through rofi
The program is meant to be used through rofi (or a compatible launcher), with the interface described at https://davatorium.github.io/rofi/current/rofi-script.5/.
Start rofi with a custom mode with a command like this:
rofi -show copyright -modes "copyright:./main.scm"
You should be prompted with the available tools. When selecting a tool with <return>, it will run, placing the processed text on your clipboard, without any further output.
Standalone(?)
For testing/scripting, it can probably be used directly without rofi.
List modes
Run without arguments to list all available modes;
$ ./main.scm
Enquote (markdown)
SpOnGeBoB
Run
Specify the name of a mode, exactly as written in the usage listing, as the first and only argument to run the program in that mode. It will automatically consume the item in your clipboard and copy the "output".
$ echo "sarcasm is annoying" | wl-copy
$ ./main.scm "SpOnGeBoB"
$ wl-paste
SaRcAsM Is aNnOyInG
TODOs
- Implement the rest of the planned modes
- Improve I/O methods
- Add stdin/stdout mode
- Add MacOS/pbcopy mode
- Add X11 mode?
- Do some basic error handling
- When the I/O method is unavailable
- When using a URL-mode on something other than a valid URL
- etc.
- Move
bad-query-paramsinto a separate text file- Probably requires a rewrite of the nix package
- Write better CLI argument handling
- Make the script actually usable without rofi
- Helps with MacOS support, testing, etc.
- e.g. mode switches (
--spongebob) and i/o type switches (--rofi)
- Write automated tests to verify operation and work as illustrations/usage examples
- Specify more rofi options (set
prompt, add hotkeys, etc.)