Xclip: Difference between revisions

From wikinotes
No edit summary
Line 14: Line 14:
<blockquote>
<blockquote>
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
echo foo | xclip                      # copy 'foo' to selection-buffer (shift+ins)
# copy 'foo' to selection-buffer (shift+ins)
echo foo | xclip -selection clipboard  # copy 'foo' to clipboard       (ctrl+v, alt+shift+ins)
echo foo | xclip
 
# copy 'foo' to clipboard (ctrl+v, alt+shift+ins)
echo foo | xclip -selection clipboard 
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Usage -->
</blockquote><!-- Usage -->

Revision as of 23:01, 6 August 2021

xclip is a cli interface for your clipboard.

Documentation

github https://github.com/astrand/xclip
man xclip https://man.archlinux.org/man/extra/xclip/xclip.1.en

Usage

# copy 'foo' to selection-buffer (shift+ins)
echo foo | xclip

# copy 'foo' to clipboard (ctrl+v, alt+shift+ins)
echo foo | xclip -selection clipboard