clipman(1)

πŸ’– clipman(1) β€” your clipboard's new bestie πŸ’–

okay so this is the clipman(1) page from the General Commands Manual, and honestly? it's giving "tiny tool, big job." sit down, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

clipman β€” a clipboard manager for Wayland 🫢


🌸 SYNOPSIS 🌸

clipman [<options>] <command> [<args> ...]

πŸ¦‹ DESCRIPTION πŸ¦‹

it's a basic clipboard manager for Wayland, bestie β€” but the icon behavior is that it supports persisting copy buffers after an application exits. like, the app dips and your clipboard still remembers. main character energy fr fr πŸ’…


πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows context-sensitive help. also go ahead and try --help-long and --help-man if you're nosy (affectionate) πŸ’–
  • --histpath="~/.local/share/clipman.json" β€” the path of the history file. that's the default one right there ☝️
  • --primary β€” serve the item to the primary clipboard. default is --no-primary, just so you know πŸ‘€
  • --notify β€” sends desktop notifications when there are errors
  • --err-on-no-selection β€” exits with an exit 1 when no selection is made in the picker
  • --min-char β€” the minimum number of characters before something gets stored
  • -v, --version β€” shows the application version

πŸ‘‘ COMMANDS πŸ‘‘

🧁 help [<command>...]

shows help. that's it. that's the whole vibe.

πŸ’Ύ store [<flags>]

records clipboard events β€” you run this as an argument to wl-paste --watch, iykyk

  • --max-items=15 β€” the history size
  • -P, --no-persist β€” don't persist a copy buffer after a program exits
  • --unix β€” normalizes line endings to LF

πŸ” pick --tool=TOOL [<flags>]

picks an item out of your clipboard history ✨

  • --max-items=15 β€” scrollview length
  • -t, --tool=TOOL β€” which selector to use: wofi/bemenu/CUSTOM/STDOUT
  • -T, --tool-args="" β€” extra arguments passed to the --tool
  • --print0 β€” separates items using NULL; highly recommended if your tool supports --read0 or similar πŸ™Œ
  • --normalize-unicode β€” normalizes to NFC per https://unicode.org/reports/tr15

🧹 clear [<flags>]

removes item/s from history πŸ—‘οΈ

  • --max-items=15 β€” scrollview length
  • -t, --tool=TOOL β€” which selector to use: wofi/bemenu/CUSTOM/STDOUT
  • -T, --tool-args="" β€” extra arguments passed to the --tool
  • -a, --all β€” removes all items
  • --print0 β€” separates items using NULL; recommended if your tool supports --read0 or similar
  • --normalize-unicode β€” normalizes to NFC per https://unicode.org/reports/tr15

🌈 restore

serves the last recorded item from history

⭐ show-history

shows all items from history


🧚 USAGE 🧚

run the binary in your Sway session by adding this to your config:

exec wl-paste -t text --watch clipman store

or, if you wanna log errors:

exec wl-paste -t text --watch clipman store \
    1>> PATH/TO/LOGFILE 2>&1
it is highly recommended that you run clipman with the --no-persist option β€” go read KNOWN ISSUES, seriously, bestie, do it 😭

for primary clipboard support, also add this:

exec wl-paste -p -t text --watch clipman store -P \
    --histpath="~/.local/share/clipman-primary.json"

note that both the -p in wl-paste and the -P in clipman are mandatory in this case. no cap, both of them. πŸ‘‘

to query the history and select items, run the binary as:

clipman pick -t wofi

you can assign it to a keybinding:

bindsym $mod+h exec clipman pick -t wofi

you can pass additional arguments to the selector like this:

clipman pick --tool wofi -T'--prompt=my-prompt -i'

both --prompt and -i are flags of wofi, fyi πŸ’…

you can use a custom selector like this:

clipman pick --print0 --tool=CUSTOM --tool-args= \
    "fzf --prompt 'pick > ' --bind 'tab:up' --cycle --read0"

to only paste if there's actually something selected:

bindsym $mod+v exec "clipman pick -t wofi --err-on-no-selection \
    && wtype -M ctrl -M shift v"

to remove items from history:

clipman clear -t wofi
clipman clear --all

to serve the last history item at startup, add this to your Sway config:

exec clipman restore

πŸ’€ BUGS πŸ’€

when you hit a clipboard-related bug, pls try to see if it still happens without clipman running β€” because it's more likely to be caused by one of our own known issues rather than by wl-clipboard. don't blame the wrong tool πŸ™ˆ


😭 KNOWN ISSUES 😭

we only support plain text. that's the whole thing. periodt.

by default, we keep serving the last copied item even after its owner has exited. which means that β€” unless you run with the --no-persist option β€” you'll always immediately lose rich content. examples, since you asked:

  • vim's visual block mode breaks
  • copying images in Firefox breaks
  • if you copy a bookmark in Firefox, you won't be able to paste it in another bookmark folder
  • if you copy formatted text inside Libre Office you'll lose all formatting on paste

run clipman store with the --no-persist option if you are affected. unfortunately, it seems that there is no way to make them play well together. like, at all. 🫠


okay that's the whole page!! this was clipman(1) from the General Commands Manual, and the whole thing signs off as clipman(1) β€” no extra version line, no date, just the page name doing its little wave goodbye. slay, go manage a clipboard πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from