extensible clipboard cli for wayland
|
|
||
|---|---|---|
| protocols | ||
| snarfsrv | ||
| wl-clipboard-shim | ||
| arg.h | ||
| Makefile | ||
| README | ||
| wlsnarf.c | ||
wlsnarf - extensible clipboard cli for wayland usage: wlsnarf [-s <seat>] [-p] [-o] ([-t <mimetype>]... -i <file>)... wlsnarf [-s <seat>] [-p] [-o] -w <cmd> <args>... wlsnarf [-s <seat>] [-p] -c options: -s SEAT seat name -p use primary clipboard -o run for one offer only -w CMD spawn command for each offer with clipboard contents as stdin and mimetype appended to args -c clear clipboard -t TYPE specify mimetypes for file -i FILE source contents from file description: wlsnarf is a highly extensible and scriptable clipboard manager that uses the wlr-data-control protocol. wlsnarf can set the clipboard contents by using the -t and -i flags to offer mimetypes for file sources. wlsnarf accepts any number of mimetypes before a file argument. if no mimetype is provided, a null string will be used. if no file is provided, stdin will be used. if file is a pipe, contents will only be served once. (see snarfsrv) clipboard contents are handled by passing a helper command to -w. wlsnarf watches for changes in clipboard contents, spawning a helper for each mimetype. the helper command can read the clipboard contents from stdin and the mimetype is appended to its command line. examples: # copy stdin as plaintext to primary clipboard (serves only once) wlsnarf -p -t text/plain # copy screenshot as image/png and paste only once wlsnarf -o -t image/png -i <(grim -) # without process substitution grim - | wlsnarf -o -t image/png # copy README as both text and markdown wlsnarf -t text/plain -t text/markdown README # clear clipboard on seat0 wlsnarf -s seat0 -c # list available mimetypes (like wl-paste -l) wlsnarf -o -w echo # watch available mimetypes on primary clipboard wlsnarf -p -w echo # paste clipboard contents matching mimetype wlsnarf -o -w sh -c '[ text/plain = "$1" ] && cat' -s extras: # file server with persistence snarfsrv/snarfsrv # wl-clipboard drop-in replacements wl-clipboard-shim/wl-copy wl-clipboard-shim/wl-paste