wl-paste

Paste data from Wayland clipboard

TLDR

Paste the contents of the clipboard
$ wl-paste
Paste from the primary clipboard (highlighted text)
$ wl-paste --primary
Write clipboard contents to a file
$ wl-paste > [path/to/file]
Paste without trailing newline
$ wl-paste --no-newline
List available MIME types in clipboard
$ wl-paste --list-types
Paste clipboard as a specific MIME type (e.g., image)
$ wl-paste --type image/png > [path/to/image.png]
Pipe clipboard contents to a command
$ wl-paste | [command]
Run a command each time the clipboard changes
$ wl-paste --watch [command]

SYNOPSIS

wl-paste [options]

DESCRIPTION

wl-paste retrieves data from the Wayland clipboard and writes it to stdout. It can request specific MIME types for clipboard data, supporting both text and binary content like images.The primary selection (text selected with mouse) can be accessed with --primary, enabling middle-click paste functionality. The watch mode allows monitoring clipboard changes.

PARAMETERS

-p, --primary

Use the primary selection instead of clipboard
-n, --no-newline
Do not append newline character
-t, --type mime-type
Request specific MIME type
-l, --list-types
List available MIME types
-s, --seat seat
Pick the seat to work with
-w, --watch command [args...]
Run command each time clipboard changes
-v, --version
Display version information
-h, --help
Display help message

INSTALL

sudo apt install wl-clipboard
sudo dnf install wl-clipboard
sudo pacman -S wl-clipboard
sudo apk add wl-clipboard
sudo zypper install wl-clipboard
brew install wl-clipboard
nix profile install nixpkgs#wl-clipboard

CAVEATS

Only works under Wayland; use xclip or xsel for X11. MIME type availability depends on what the copying application provides. Some applications may not populate the primary selection.

HISTORY

Part of wl-clipboard, written by Sergey Bugaev for Wayland-native clipboard access. Provides the paste counterpart to wl-copy, implementing the Wayland data-device protocol for clipboard reading.

SEE ALSO

wl-copy(1), xclip(1), xsel(1)