Skip to content

Instantly share code, notes, and snippets.

@jaymcgavren
Created July 14, 2009 00:31
Show Gist options
  • Save jaymcgavren/146565 to your computer and use it in GitHub Desktop.
Save jaymcgavren/146565 to your computer and use it in GitHub Desktop.
Version of 'cb' clipboard getter/setter that should work with xfce
#!/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