A simple Imgur Bash screenshot utility

May 2010

I use screenshots a lot, every day. Mostly when I do instant messaging, they can usually help explain something much quicker than anything else. It’s rare that I edit the screenshot, and in these rare occasions, it doesn’t bother me all that much having to fire up Pinta or Gimp–to make these small changes.

Installation

shoot’s dependencies are:

curl

grep

scrot

xclip

libnotify (optional)

You probably have those already, if not, install them via your package manager.

Now we have the direct link, and then it’s simply a matter of putting this all into the clipboard with xclip:

xclip -selection c

Now this is optional, but quite handy. It uses libnotify to notify you when the image is uploaded, and ready to be pasted:

notify-send "Clipboard ready!"

The script

And I compiled all this into this simple script (I’m aware that this can be a one-liner and everything but this just seems more readable and works. If you have a better solution, be sure to contact me!):