HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

wl-copy — Clear and copy to Wayland clipboard. See also: `wl-paste`, `xclip`. More information: <https://githu

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandwaylandcopyandclipboardcliwl-copyclear
linux

Problem

How to use the wl-copy command: Clear and copy to Wayland clipboard. See also: wl-paste, xclip. More information: <https://github.com/bugaevc/wl-clipboard>.

Solution

wl-copy — Clear and copy to Wayland clipboard. See also: wl-paste, xclip. More information: <https://github.com/bugaevc/wl-clipboard>.

Copy the text to the clipboard:
wl-copy "{{text}}"


Pipe the command (ls) output to the clipboard:
{{ls}} | wl-copy


Copy for only one paste and then clear it:
wl-copy --paste-once "{{text}}"


Copy an image:
wl-copy < {{path/to/image}}


Clear the clipboard:
wl-copy --clear

Code Snippets

Copy the text to the clipboard

wl-copy "{{text}}"

Pipe the command (`ls`) output to the clipboard

{{ls}} | wl-copy

Copy for only one paste and then clear it

wl-copy --paste-once "{{text}}"

Copy an image

wl-copy < {{path/to/image}}

Clear the clipboard

wl-copy --clear

Context

tldr-pages: linux/wl-copy

Revisions (0)

No revisions yet.