
This mode requires a compositor that supports the wlroots data-control protocol.
The spawned process can read the clipboard contents from its standard input. Instead of pasting once and exiting, continuously watch the clipboard for changes, and run the specified command each time a new selection appears. -l, -list-types Instead of pasting the selection, output the list of MIME types it is offered in.
This option is automatically enabled for non-text content types and when using the -watch mode.
-n, -no-newline Do not append a newline character after the pasted clipboard content. -c, -clear Instead of copying anything, clear the clipboard so that nothing is copied. -f, -foreground By default, wl-copy forks and serves data requests in the background this option overrides that behavior, causing wl-copy to run in the foreground. Note that this may break pasting into some clients, in particular pasting into XWayland windows is known to break when this option is used. Unless a clipboard manager specifically designed to prevent this is in use, this has the effect of clearing the clipboard after the first paste, which is useful for copying sensitive data such as passwords. -o, -paste-once Only serve one paste request and then exit. -n, -trim-newline Do not copy the trailing newline character if it is present in the input file. Implicit type inference, you can explicitly specify the type to use with the If you're not satisfied with the type they pick or don't want to rely on this The list of offered MIME types and the extension of the file it's pasting into. wl-paste tries its best to pick a type to paste based on wl-copy automatically infers the type of the copied content by running Other textual content formats, they fully support content of arbitrary MIME $ wl-copy "!! " # replace the current selection with the list of types it's offered inĪlthough wl-copy and wl-paste are particularly optimized for plain text and $ for word in $(wl-paste ) do grep $word source.c done # copy the previous command
$ wl-copy Hello world ! # copy the list of files in Downloads