1WL-CLIPBOARD(1) General Commands Manual WL-CLIPBOARD(1)
2
3
4
6 wl-clipboard - Wayland copy and paste command line utiltites
7
9 wl-copy [--primary] [--paste-once] [--foreground] [--clear] [--type
10 mime/type] [text...]
11
12 wl-paste [--primary] [--no-newline] [--list-types] [--type mime/type]
13
15 wl-copy copies the given text to the Wayland clipboard. If no text is
16 given, wl-copy copies data from its standard input.
17
18 wl-paste pastes data from the Wayland clipboard to its standard output.
19
20 Although wl-copy and wl-paste are particularly optimized for plain text
21 and other textual content formats, they fully support content of arbi‐
22 trary MIME types. wl-copy automatically infers the type of the copied
23 content by running xdg-mime(1) on it. wl-paste tries its best to pick a
24 type to paste based on the list of offered MIME types and the extension
25 of the file it's pasting into. If you're not satisfied with the type
26 they pick or don't want to rely on this implicit type inference, you
27 can explicitly specify the type to use with the --type option.
28
30 -p, --primary
31 Use the "primary" clipboard instead of the regular clipboard.
32 This uses the private GTK+ primary selection protocol. See the
33 GNOME Wiki page on primary selection under Wayland
34 ⟨https://wiki.gnome.org/Initiatives/Wayland/PrimarySelection⟩
35 for more details.
36
37 -o, --paste-once
38 Only serve one paste request and then exit. Unless a clipboard
39 manager specifically designed to prevent this is in use, this
40 has the effect of clearing the clipboard after the first paste,
41 which is useful for copying sensitive data such as passwords.
42 Note that this may break pasting into some clients, in particu‐
43 lar pasting into XWayland windows is known to break when this
44 option is used.
45
46 -f, --foreground
47 By default, wl-copy forks and serves data requests in the back‐
48 ground; this option overrides that behavior, causing wl-copy to
49 run in the foreground.
50
51 -c, --clear
52 Instead of copying anything, clear the clipboard so that nothing
53 is copied.
54
55 -n, --no-newline
56 Do not append a newline character after the pasted clipboard
57 content. This option is automatically enabled for non-text con‐
58 tent types.
59
60 -t mime/type, --type mime/type
61 Override the automatically selected MIME type. For wl-copy this
62 option controls which type wl-copy will offer the content as.
63 For wl-paste it controls which of the offered types wl-paste
64 will request the content in. In addition to specific MIME types
65 such as image/png, wl-paste also accepts generic type names such
66 as text and image which make it automatically pick some offered
67 MIME type that matches the given generic name.
68
69 -l, --list-types
70 Instead of pasting the selection, output the list of MIME types
71 it is offered in.
72
74 WAYLAND_DISPLAY
75 Specifies what Wayland server wl-copy and wl-paste should con‐
76 nect to. This is the same environment variable that you pass to
77 other Wayland clients, such as graphical aplications, that con‐
78 nect to this Wayland server. It is normally set up automatically
79 by the graphical session and the Wayland compositor. See wl_dis‐
80 play_connect(3) for more details.
81
82 WAYLAND_DEBUG
83 When set to 1, causes the wayland-client(7) library to log every
84 interaction wl-copy and wl-paste make with the Wayland composi‐
85 tor to stderr.
86
88 $ wl-copy Hello world!
89
90 $ ls ~/Downloads | wl-copy
91
92 $ wl-copy < ~/Pictures/photo.png
93
94 $ wl-copy "!!"
95
96 $ wl-paste -n > clipboard.txt
97
98 $ wl-paste --list-types | wl-copy
99
101 xclip(1)
102
103
104
105wl-clipboard 2018-10-03 WL-CLIPBOARD(1)