Takes screenshot, uploads it to imgur and returns a link to that image.
#!/bin/bash
cd /tmp
if [ -f "temp.png" ]; then rm temp.png ; fi
import temp.png
if [ -f "temp.png" ]; then
curl -F "image=@temp.png" -F "key=9549c154df3f031d351e016585c8f338" http://api.imgur.com/2/upload.xml -s |grep -oE "<original>.*png" |sed 's/<original>//'
rm temp.png
else
echo "failed!"
fi