wl-paste(1)
Paste text from the Wayland clipboard to standard output.
UbuntuDebianFedoraArch
Synopsis
wl-paste [OPTION]... [TYPE]Description
wl-paste retrieves text or data from the Wayland clipboard and writes it to standard output. It works with the primary selection and clipboard selection on Wayland compositors that support the data-control protocol.
If no TYPE is specified, it defaults to text/plain. You can retrieve other MIME types like image/png or text/html by specifying them explicitly.
Common options
| Flag | What it does |
|---|---|
-n | Do not add a trailing newline to the output |
-p | Paste from primary selection instead of clipboard |
-t TYPE | Specify MIME type to paste (e.g., text/html, image/png) |
--type TYPE | Long form of -t; specify MIME type |
-l | List available MIME types in clipboard |
--list-types | Long form of -l; list available types |
Examples
Paste clipboard contents as plain text to stdout
wl-pasteSave clipboard contents to a file
wl-paste > file.txtPaste from primary selection (middle-click buffer)
wl-paste -pPaste without adding a trailing newline
wl-paste -nList all MIME types available in current clipboard
wl-paste -lPaste clipboard contents as HTML if available
wl-paste -t text/htmlExtract and save clipboard image to PNG file
wl-paste -t image/png > image.png