Clipboard helper utility for rofi
  • Scheme 74.5%
  • Nix 25.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-04 02:34:07 +02:00
.gitignore flake.nix: init 2026-10-03 23:09:44 +02:00
flake.lock flake.nix: init 2026-10-03 23:09:44 +02:00
flake.nix flake.nix: init 2026-10-03 23:09:44 +02:00
main.scm main.scm: add mode-clean-link 2026-10-04 02:34:07 +02:00
README.md main.scm: add mode-clean-link 2026-10-04 02:34:07 +02:00

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-params into 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.)