-
-
Save whyvez/8c7fdb7a8286121d4fcd to your computer and use it in GitHub Desktop.
shoot
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 | |
# | |
# Takes a screenshot, puts the URL in your clipboard, | |
# Then syncronizes the screenshot to your configured host | |
LOCALDIR="$HOME/documents/screenshots/" | |
REMOTEHOST="mjz.me" | |
REMOTEDIR="/home/matt/public/mjz.me/public/s/" | |
TIMESTAMP=`date +%s` | |
WEBHOST="http://mjz.me/s/" | |
echo $LOCALDIR | |
mkdir -p $LOCALDIR | |
scrot -s "$LOCALDIR/$TIMESTAMP.png" | |
echo "$WEBHOST$TIMESTAMP.png" | xclip -selection c | |
notify-send "Saved locally as $TIMESTAMP.png.\nClipboard already available.\nSyncronizing..." | |
rsync -avzru --delete-excluded $LOCALDIR $REMOTEHOST:$REMOTEDIR | |
notify-send "Complete. $WEBHOST$TIMESTAMP" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment