Skip to content

Instantly share code, notes, and snippets.

@j0hn
Created July 11, 2011 00:53
Show Gist options
  • Save j0hn/1075154 to your computer and use it in GitHub Desktop.
Save j0hn/1075154 to your computer and use it in GitHub Desktop.
Takes a screenshot and uploads it to imgur
#!/bin/bash
IMGPATH="/tmp/$(date +%s)_imgur.png"
if [ "$1" = "window" ]; then
scrot --focused "$IMGPATH"
else
scrot "$IMGPATH"
fi
URL=$(DISPLAY= imgurbash $IMGPATH)
notify-send "Image Uploaded $URL"
echo -n $URL | xclip -selection clipboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment