When copying text to the clipboard, xclip provides several selection targets:
-selection
specify which X selection to use, options are:
"primary" to use XA_PRIMARY (default),
"secondary" for XA_SECONDARY
"clipboard" for XA_CLIPBOARD
Is there a way to target multiple selections?
I have tried the following options
echo "Hello world" | xclip -i -selection primary -selection clipboard
echo "Hello world" | xclip -i selection primary | xclip -i selection clipboard
echo "Hello world" | xclip -i selection primary,clipboard
but none of them worked.
xclip
commands which is quite convenient and 3) For some odd reason, it's the only answer so far that gives a working solution in my experiments for bindingcopy-pipe
intmux
(this is what prompted this question) – Amelio Vazquez-Reina Mar 25 '13 at 20:18xsel
, an alternative toxclip
, you can useecho 'Hello World' | xsel -i -p && xsel -o -p | xsel -i -b
. It's slightly different and less efficient thanxclip
due toxsel
lacking a filter option. But if you're stuck withxsel
then this is a way to solve the problem. – starfry Feb 05 '17 at 11:55