1WL-CLIPBOARD(1)             General Commands Manual            WL-CLIPBOARD(1)
2
3
4

NAME

6       wl-clipboard - Wayland copy and paste command line utilities
7

SYNOPSIS

9       wl-copy   [--primary]  [--trim-newline]  [--paste-once]  [--foreground]
10       [--clear] [--type mime/type] [--seat seat-name] [text...]
11
12       wl-paste [--primary] [--no-newline] [--list-types]  [--type  mime/type]
13       [--seat seat-name] [--watch command...]
14

DESCRIPTION

16       wl-copy  copies the given text to the Wayland clipboard.  If no text is
17       given, wl-copy copies data from its standard input.
18
19       wl-paste pastes data from the Wayland clipboard to its standard output.
20
21       Although wl-copy and wl-paste are particularly optimized for plain text
22       and  other textual content formats, they fully support content of arbi‐
23       trary MIME types. wl-copy automatically infers the type of  the  copied
24       content by running xdg-mime(1) on it. wl-paste tries its best to pick a
25       type to paste based on the list of offered MIME types and the extension
26       of  the  file  it's pasting into. If you're not satisfied with the type
27       they pick or don't want to rely on this implicit  type  inference,  you
28       can explicitly specify the type to use with the --type option.
29

OPTIONS

31       -p, --primary
32              Use the "primary" clipboard instead of the regular clipboard.
33
34       -o, --paste-once
35              Only  serve  one paste request and then exit. Unless a clipboard
36              manager specifically designed to prevent this is  in  use,  this
37              has  the effect of clearing the clipboard after the first paste,
38              which is useful for copying sensitive data  such  as  passwords.
39              Note  that this may break pasting into some clients, in particu‐
40              lar pasting into XWayland windows is known to  break  when  this
41              option is used.
42
43       -f, --foreground
44              By  default, wl-copy forks and serves data requests in the back‐
45              ground; this option overrides that behavior, causing wl-copy  to
46              run in the foreground.
47
48       -c, --clear
49              Instead of copying anything, clear the clipboard so that nothing
50              is copied.
51
52       -n, --trim-newline
53              Do not copy the trailing newline character if it is  present  in
54              the input file.
55
56       -n, --no-newline
57              Do  not  append  a  newline character after the pasted clipboard
58              content. This option is automatically enabled for non-text  con‐
59              tent types and when using the --watch mode.
60
61       -t mime/type, --type mime/type
62              Override  the automatically selected MIME type. For wl-copy this
63              option controls which type wl-copy will offer  the  content  as.
64              For  wl-paste  it  controls  which of the offered types wl-paste
65              will request the content in. In addition to specific MIME  types
66              such as image/png, wl-paste also accepts generic type names such
67              as text and image which make it automatically pick some  offered
68              MIME type that matches the given generic name.
69
70       -s seat-name, --seat seat-name
71              Specify  which  seat wl-copy and wl-paste should work with. Way‐
72              land natively supports multi-seat configurations where each seat
73              gets  its  own  mouse  pointer,  keyboard focus, and among other
74              things its own separate clipboard. The name of the default  seat
75              is  likely  default or seat0, and additional seat names normally
76              come from the udev(7) property ENV{WL_SEAT}. You  can  view  the
77              list  of the currently available seats as advertised by the com‐
78              positor using the weston-info(1) tool. If you don't specify  the
79              seat  name  explicitly,  wl-copy  and  wl-paste will pick a seat
80              arbitrarily. If you are using a  single-seat  system,  there  is
81              little reason to use this option.
82
83       -l, --list-types
84              Instead  of pasting the selection, output the list of MIME types
85              it is offered in.
86
87       -w command..., --watch command...
88              Instead of pasting once  and  exiting,  continuously  watch  the
89              clipboard for changes, and run the specified command each time a
90              new selection appears.  The spawned process can read  the  clip‐
91              board  contents  from  its standard input.  This mode requires a
92              compositor that supports the wlroots data-control protocol.
93
94       -v, --version
95              Display the version of wl-clipboard and some  short  info  about
96              its license.
97
98       -h, --help
99              Display a short help message listing the available options.
100

ENVIRONMENT

102       WAYLAND_DISPLAY
103              Specifies  what  Wayland server wl-copy and wl-paste should con‐
104              nect to. This is the same environment variable that you pass  to
105              other Wayland clients, such as graphical applications, that con‐
106              nect to this Wayland server. It is normally set up automatically
107              by the graphical session and the Wayland compositor. See wl_dis‐
108              play_connect(3) for more details.
109
110       WAYLAND_DEBUG
111              When set to 1, causes the wayland-client(7) library to log every
112              interaction  wl-copy and wl-paste make with the Wayland composi‐
113              tor to stderr.
114

EXAMPLES

116       $ wl-copy Hello world!
117
118       $ ls ~/Downloads | wl-copy
119
120       $ wl-copy < ~/Pictures/photo.png
121
122       $ wl-copy "!!"
123
124       $ wl-paste -n > clipboard.txt
125
126       $ wl-paste --list-types | wl-copy
127

AUTHOR

129       Written by Sergey Bugaev.
130

REPORTING BUGS

132       Report  wl-clipboard   bugs   to   <https://github.com/bugaevc/wl-clip
133       board/issues>
134
136       Copyright  ©  2019 Sergey Bugaev.  License GPLv3+: GNU GPL version 3 or
137       later <https://gnu.org/licenses/gpl.html>.
138       This is free software: you are free  to  change  and  redistribute  it.
139       There is NO WARRANTY, to the extent permitted by law.
140

SEE ALSO

142       xclip(1), xsel(1), wl-clipboard-x11(1)
143
144
145
146wl-clipboard                      2019-09-16                   WL-CLIPBOARD(1)
Impressum