-
-
Save codecat/3049811 to your computer and use it in GitHub Desktop.
xfce4-screenshooter to imgur
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ubuntu Keyboard settings shortcut: | |
# xfce4-screenshooter -r -o "sh /location/to/imgur-uploader.sh" | |
API_KEY=YOUR_API_KEY_GOES_HERE | |
URL=http://api.imgur.com/2/upload | |
RESPONSE=$(curl -s -F "key=$API_KEY" -F "image=@$1" $URL) | |
echo "$RESPONSE" | grep -o -E "<original>.*</original>" | grep -o -E "http://.*\.png" | xsel -i -b | |
notify-send -i info "Screenshot uploaded" "URL has been copied to clipboard" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment