Created
January 11, 2017 10:24
-
-
Save kaosf/8d0b3954be705e8c31e65a94ba1a124b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Earthquake.init do | |
command :y do |m| | |
target = twitter.status(m[1]) | |
url = "https://twitter.com/#{target["user"]["screen_name"]}/status/#{target["id"]}" | |
system("echo -n #{url} | xsel -ib") | |
puts "Yank \"#{url}\"." | |
#system("tmux set-buffer #{url}") | |
#puts "Set \"#{url}\" to tmux buffer" | |
end | |
help :y, 'Yank', 'Yank tweet URL' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment