Hacker Public Radio

← Hacker Public Radio7. Okt.

HPR4743: wl-copy

HPR4743: wl-copy7. Okt.

wl-copy is a command in the wl-clipboard package, and allows you to copy and paste data from your Linux Terminal on a Wayland desktop.

Copy an arbitrary string to your clipboard using wl-copy:

$ wl-copy "hello world"

Paste it anywhere on your system as usual (with Ctrl+Shift+V or a right-click and Paste).

You can copy from output, too:

$ echo "hello wide world" | wl-copy

You can redirect to wl-copy:

$ echo "hello world" > example.txt

$ wl-copy < example.txt

You can use wl-paste to paste from your system clipboard:

$ wl-paste

"hello world"