Commit 9b37637a authored by Glen Mével's avatar Glen Mével
Browse files

`clipboards`: view the contents of the X clipboards

parent da056a91
# Display the contents of the X clipboard.
import gtk
clipboard = gtk.Clipboard()
targets = clipboard.wait_for_targets()
if not targets:
print "\x1B[1;34mNo target available\x1B[0m"
print "\x1B[1;34mTargets available:", ", ".join(map(str, targets)), "\x1B[0m"
for target in targets:
print "\x1B[1;33mTarget %s:\x1B[0m" % str(target)
contents = clipboard.wait_for_contents(target)
if contents:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment