.TH WL-CLIPBOARD 1 2019-09-16 wl-clipboard .SH NAME wl-clipboard \- Wayland copy and paste command line utilities .SH SYNOPSIS .B wl-copy [\fB--primary\fR] [\fB--trim-newline\fR] [\fB--paste-once\fR] [\fB--foreground\fR] [\fB--clear\fR] [\fB--type \fImime/type\fR] [\fB--seat \fIseat-name\fR] [\fItext\fR...] .PP .B wl-paste [\fB--primary\fR] [\fB--no-newline\fR] [\fB--list-types\fR] [\fB--type \fImime/type\fR] [\fB--seat \fIseat-name\fR] [\fB--watch \fIcommand\fR...\] .SH DESCRIPTION \fBwl-copy\fR copies the given \fItext\fR to the Wayland clipboard. If no \fItext\fR is given, \fBwl-copy\fR copies data from its standard input. .PP \fBwl-paste\fR pastes data from the Wayland clipboard to its standard output. .PP Although \fBwl-copy\fR and \fBwl-paste\fR are particularly optimized for plain text and other textual content formats, they fully support content of arbitrary MIME types. \fBwl-copy\fR automatically infers the type of the copied content by running \fBxdg-mime\fR(1) on it. \fBwl-paste\fR tries its best to pick a type to paste based on the list of offered MIME types and the extension of the file it's pasting into. If you're not satisfied with the type they pick or don't want to rely on this implicit type inference, you can explicitly specify the type to use with the \fB--type\fR option. .SH OPTIONS .TP \fB-p\fR, \fB--primary Use the "primary" clipboard instead of the regular clipboard. .TP \fB-o\fR, \fB--paste-once Only serve one paste request and then exit. Unless a clipboard manager specifically designed to prevent this is in use, this has the effect of clearing the clipboard after the first paste, which is useful for copying sensitive data such as passwords. Note that this may break pasting into some clients, in particular pasting into XWayland windows is known to break when this option is used. .TP \fB-f\fR, \fB--foreground By default, \fBwl-copy\fR forks and serves data requests in the background; this option overrides that behavior, causing \fBwl-copy\fR to run in the foreground. .TP \fB-c\fR, \fB--clear Instead of copying anything, clear the clipboard so that nothing is copied. .TP \fB-n\fR, \fB--trim-newline Do not copy the trailing newline character if it is present in the input file. .TP \fB-n\fR, \fB--no-newline Do not append a newline character after the pasted clipboard content. This option is automatically enabled for non-text content types and when using the \fB--watch\fR mode. .TP \fB-t\fI mime/type\fR, \fB--type\fI mime/type Override the automatically selected MIME type. For \fBwl-copy\fR this option controls which type \fBwl-copy\fR will offer the content as. For \fBwl-paste\fR it controls which of the offered types \fBwl-paste\fR will request the content in. In addition to specific MIME types such as \fIimage/png\fR, \fBwl-paste\fR also accepts generic type names such as \fItext\fR and \fIimage\fR which make it automatically pick some offered MIME type that matches the given generic name. .TP \fB-s\fI seat-name\fR, \fB--seat\fI seat-name Specify which seat \fBwl-copy\fR and \fBwl-paste\fR should work with. Wayland natively supports multi-seat configurations where each seat gets its own mouse pointer, keyboard focus, and among other things its own separate clipboard. The name of the default seat is likely \fIdefault\fR or \fIseat0\fR, and additional seat names normally come from the .BR udev (7) property \fBENV{WL_SEAT}\fR. You can view the list of the currently available seats as advertised by the compositor using the .BR weston-info (1) tool. If you don't specify the seat name explicitly, \fBwl-copy\fR and \fBwl-paste\fR will pick a seat arbitrarily. If you are using a single-seat system, there is little reason to use this option. .TP \fB-l\fR, \fB--list-types Instead of pasting the selection, output the list of MIME types it is offered in. .TP \fB-w\fI command\fR..., \fB--watch \fIcommand\fR... Instead of pasting once and exiting, continuously watch the clipboard for changes, and run the specified \fIcommand\fR each time a new selection appears. The spawned process can read the clipboard contents from its standard input. This mode requires a compositor that supports the wlroots data-control protocol. .TP \fB-v\fR, \fB--version Display the version of wl-clipboard and some short info about its license. .TP \fB-h\fR, \fB--help Display a short help message listing the available options. .SH ENVIRONMENT .TP WAYLAND_DISPLAY Specifies what Wayland server \fBwl-copy\fR and \fBwl-paste\fR should connect to. This is the same environment variable that you pass to other Wayland clients, such as graphical applications, that connect to this Wayland server. It is normally set up automatically by the graphical session and the Wayland compositor. See .BR wl_display_connect (3) for more details. .TP WAYLAND_DEBUG When set to \fB1\fR, causes the \fBwayland-client\fR(7) library to log every interaction \fBwl-copy\fR and \fBwl-paste\fR make with the Wayland compositor to stderr. .SH EXAMPLES $ .BI wl-copy " Hello world!" .PP $ .IB "ls ~/Downloads" " | wl-copy" .PP $ .BI "wl-copy < " ~/Pictures/photo.png .PP $ .B wl-copy \(dq!!\(dq .PP $ .BI "wl-paste -n > " clipboard.txt .PP $ .B wl-paste --list-types | wl-copy .SH AUTHOR Written by Sergey Bugaev. .SH REPORTING BUGS Report wl-clipboard bugs to .SH COPYRIGHT Copyright \(co 2019 Sergey Bugaev. License GPLv3+: GNU GPL version 3 or later . .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH SEE ALSO .BR xclip (1), .BR xsel (1), .BR wl-clipboard-x11 (1)