7 .Nd Read from or write to the system clipboard
15 .Op Fl -selection Ar selection
19 .Op Fl -selection Ar selection
23 wraps various system-specific tools for interacting with a system clipboard,
34 can run in three different ways,
35 depending on the flag given on the command-line.
40 looks for a way to interface with the system clipboard.
42 it terminates with exit code 0.
43 If no interface to the system clipboard is available,
44 it terminates with exit code 1.
48 reads the content of standard input,
49 and stores it in the system clipboard.
53 reads the content of the system clipboard,
54 and writes it to standard output.
55 .It Fl -selection Ar selection
56 specify which selection to use, options are "primary" or "clipboard"
60 The following environment variables affect the operation of
66 will prefer to access the X11 clipboard even if other options are available.
70 .Ex -std vis-clipboard
75 an exit status of 0 means that it found a supported system-specific tool,
76 while 1 means that clipboard access is not available.
79 Test whether clipboard access is available:
80 .Bd -literal -offset indent
81 if vis-clipboard --usable; then
82 echo "Clipboard access available"
88 Copy a friendly greeting to the clipboard:
89 .Bd -literal -offset indent
90 echo "Hello, World" | vis-clipboard --copy
93 Send the current contents of the system clipboard to be recorded and analyzed:
94 .Bd -literal -offset indent
95 vis-clipboard --paste | curl -d - https://www.nsa.gov/