$linuxjunkies
>

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

FlagWhat it does
-nDo not add a trailing newline to the output
-pPaste from primary selection instead of clipboard
-t TYPESpecify MIME type to paste (e.g., text/html, image/png)
--type TYPELong form of -t; specify MIME type
-lList available MIME types in clipboard
--list-typesLong form of -l; list available types

Examples

Paste clipboard contents as plain text to stdout

wl-paste

Save clipboard contents to a file

wl-paste > file.txt

Paste from primary selection (middle-click buffer)

wl-paste -p

Paste without adding a trailing newline

wl-paste -n

List all MIME types available in current clipboard

wl-paste -l

Paste clipboard contents as HTML if available

wl-paste -t text/html

Extract and save clipboard image to PNG file

wl-paste -t image/png > image.png

Related commands