Skip to content

Instantly share code, notes, and snippets.

@fearphage
Created May 7, 2012 22:01
Show Gist options
  • Save fearphage/2630780 to your computer and use it in GitHub Desktop.
Save fearphage/2630780 to your computer and use it in GitHub Desktop.
Screenshot selection to Dropbox and copy URL
#!/bin/bash
# Settings
url=http://dl.dropbox.com/u/2400/scrot
dir=~/Dropbox/Public/scrot
filename=selection_$(date +%Y-%m-%d_%H%M%S).png
# End Settings
scrot -s "$dir/$filename"
if [ "$?" -eq "0" ]; then
echo -n "$url/$filename" | xclip -selection clipboard
notify-send "scrot" "Screenshot URL copied to clipboard"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment