man-pages/man1/wl-clipboard.1.html
2021-03-31 01:06:50 +01:00

211 lines
7.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of WL-CLIPBOARD</TITLE>
</HEAD><BODY>
<H1>WL-CLIPBOARD</H1>
Section: User Commands (1)<BR>Updated: 2019-09-16<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
wl-clipboard - Wayland copy and paste command line utilities
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>wl-copy</B>
[<B>--primary</B>]
[<B>--trim-newline</B>]
[<B>--paste-once</B>]
[<B>--foreground</B>]
[<B>--clear</B>]
[<B>--type </B><I>mime/type</I>]
[<B>--seat </B><I>seat-name</I>]
[<I>text</I>...]
<P>
<B>wl-paste</B>
[<B>--primary</B>]
[<B>--no-newline</B>]
[<B>--list-types</B>]
[<B>--type </B><I>mime/type</I>]
[<B>--seat </B><I>seat-name</I>]
[<B>--watch </B><I>command</I>...]
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>wl-copy</B> copies the given <I>text</I> to the Wayland clipboard.
If no <I>text</I> is given, <B>wl-copy</B> copies data from its standard input.
<P>
<B>wl-paste</B> pastes data from the Wayland clipboard to its standard output.
<P>
Although <B>wl-copy</B> and <B>wl-paste</B> are particularly optimized for plain
text and other textual content formats, they fully support content of arbitrary
MIME types. <B>wl-copy</B> automatically infers the type of the copied content by
running <B><A HREF="/cgi-bin/man/man2html?1+xdg-mime">xdg-mime</A></B>(1) on it. <B>wl-paste</B> 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 <B>--type</B> option.
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<DL COMPACT>
<DT id="1"><B>-p</B>, <B>--primary<DD>
Use the &quot;primary&quot; clipboard instead of the regular clipboard.
<DT id="2">-o</B>, <B>--paste-once<DD>
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.
<DT id="3">-f</B>, <B>--foreground<DD>
By default, wl-copy</B> forks and serves data requests in the background; this
option overrides that behavior, causing <B>wl-copy</B> to run in the foreground.
<DT id="4"><B>-c</B>, <B>--clear<DD>
Instead of copying anything, clear the clipboard so that nothing is copied.
<DT id="5">-n</B>, <B>--trim-newline<DD>
Do not copy the trailing newline character if it is present in the input file.
<DT id="6">-n</B>, <B>--no-newline<DD>
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
--watch</B> mode.
<DT id="7"><B>-t</B><I> mime/type</I>, <B>--type</B><I> mime/type<DD>
Override the automatically selected MIME type. For </I><B>wl-copy</B> this option
controls which type <B>wl-copy</B> will offer the content as. For <B>wl-paste</B>
it controls which of the offered types <B>wl-paste</B> will request the content
in. In addition to specific MIME types such as <I>image/png</I>, <B>wl-paste</B>
also accepts generic type names such as <I>text</I> and <I>image</I> which make it
automatically pick some offered MIME type that matches the given generic name.
<DT id="8"><B>-s</B><I> seat-name</I>, <B>--seat</B><I> seat-name<DD>
Specify which seat </I><B>wl-copy</B> and <B>wl-paste</B> 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 <I>default</I> or <I>seat0</I>, and additional
seat names normally come from the
<B><A HREF="/cgi-bin/man/man2html?7+udev">udev</A></B>(7)
property <B>ENV{WL_SEAT}</B>. You can view the list of the currently available
seats as advertised by the compositor using the
<B><A HREF="/cgi-bin/man/man2html?1+weston-info">weston-info</A></B>(1)
tool. If you don't specify the seat name explicitly, <B>wl-copy</B> and
<B>wl-paste</B> will pick a seat arbitrarily. If you are using a single-seat
system, there is little reason to use this option.
<DT id="9"><B>-l</B>, <B>--list-types<DD>
Instead of pasting the selection, output the list of MIME types it is offered
in.
<DT id="10">-w</B><I> command</I>..., <B>--watch </B><I>command</I>...<DD>
Instead of pasting once and exiting, continuously watch the clipboard for
changes, and run the specified <I>command</I> 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.
<DT id="11"><B>-v</B>, <B>--version<DD>
Display the version of wl-clipboard and some short info about its license.
<DT id="12">-h</B>, <B>--help<DD>
Display a short help message listing the available options.
</DL>
</B><A NAME="lbAF">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<DT id="13">WAYLAND_DISPLAY<DD>
Specifies what Wayland server <B>wl-copy</B> and <B>wl-paste</B> 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
<B><A HREF="/cgi-bin/man/man2html?3+wl_display_connect">wl_display_connect</A></B>(3)
for more details.
<DT id="14">WAYLAND_DEBUG<DD>
When set to <B>1</B>, causes the <B><A HREF="/cgi-bin/man/man2html?7+wayland-client">wayland-client</A></B>(7) library to log every
interaction <B>wl-copy</B> and <B>wl-paste</B> make with the Wayland compositor to
stderr.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
$
<B>wl-copy</B><I> Hello world!</I>
<P>
$
<I>ls ~/Downloads</I><B> | wl-copy</B>
<P>
$
<B>wl-copy &lt; </B><I>~/Pictures/photo.png</I>
<P>
$
<B>wl-copy &quot;!!&quot;</B>
<P>
$
<B>wl-paste -n &gt; </B><I>clipboard.txt</I>
<P>
$
<B>wl-paste --list-types | wl-copy</B>
<A NAME="lbAH">&nbsp;</A>
<H2>AUTHOR</H2>
Written by Sergey Bugaev.
<A NAME="lbAI">&nbsp;</A>
<H2>REPORTING BUGS</H2>
Report wl-clipboard bugs to &lt;<A HREF="https://github.com/bugaevc/wl-clipboard/issues">https://github.com/bugaevc/wl-clipboard/issues</A>&gt;
<A NAME="lbAJ">&nbsp;</A>
<H2>COPYRIGHT</H2>
Copyright &#169; 2019 Sergey Bugaev.
License GPLv3+: GNU GPL version 3 or later &lt;<A HREF="https://gnu.org/licenses/gpl.html">https://gnu.org/licenses/gpl.html</A>&gt;.
<BR>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
<A NAME="lbAK">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+xclip">xclip</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+xsel">xsel</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+wl-clipboard-x11">wl-clipboard-x11</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="15"><A HREF="#lbAB">NAME</A><DD>
<DT id="16"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="17"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="18"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="19"><A HREF="#lbAF">ENVIRONMENT</A><DD>
<DT id="20"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="21"><A HREF="#lbAH">AUTHOR</A><DD>
<DT id="22"><A HREF="#lbAI">REPORTING BUGS</A><DD>
<DT id="23"><A HREF="#lbAJ">COPYRIGHT</A><DD>
<DT id="24"><A HREF="#lbAK">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:29 GMT, March 31, 2021
</BODY>
</HTML>