Debian Codegraph @

at/pxclip

raw
1 #!/bin/sh
2 # Useful for exploring the way X selections work.
3 # For example, run watch -n1 pxclip in one xterm, then highlight something in
4 # another. Now single-click in the xterm to remove the highlighting. Now
5 # highlight something in Firefox. Now highlight something in the xterm again.
6 # Now switch back to Firefox, and hit ^C.
7 # Weird, huh?
8 for n in primary secondary clipboard buffer; do
9 echo "== $n =="
10 xclip -o -selection "$n"
11 echo
12 done
13 echo "== Clipboard.pm default =="
14 perl -Ilib -MClipboard -e "print Clipboard->paste"
15 echo