Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Take a screenshot and upload to imageshack.us, then copy the link to clipboard. Allow one argument, use s for selection, a integer for amount of seconds to wait. (Can't do both)
#!/bin/bash
rm screenshot.png -f
if [ $# -ne 0 ]
then
if [ "X$1" = "Xs" ]
then
scrot screenshot.png -s
else
scrot screenshot.png -d $1
fi
else
scrot screenshot.png
fi
curl -H Expect: -F fileupload="@screenshot.png" -F xml=yes -# "http://www.imageshack.us/index.php" | grep image_link | grep -o http[^\<]* | xclip -selection clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment