Created
July 14, 2009 00:31
-
-
Save jaymcgavren/146565 to your computer and use it in GitHub Desktop.
Version of 'cb' clipboard getter/setter that should work with xfce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'utility' | |
input = STDIN.isatty ? nil : STDIN.read | |
if input | |
IO.popen('xclip -selection clipboard', 'w').print(input) | |
else | |
puts `xclip -selection clipboard -o` | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment