Screenshot Script – scrot + scp

Its a really nice feature to be able with one keystroke to take a screenshot of a selected region of the screen and automatically uploading it and get the destination url of the uploaded image at the clipboard:
#/bin/bash!
sleep 0.6
mkdir -p ~/Shots/
DATE=`date +%d-%m-%y-%H:%M:%S`
scrot -s ~/screenshot.png
# xclip -t image/png -se c ~/screenshots.png
#echo "http://www.hosting.com/screenshots/$DATE.png" | xclip -se c
cp ~/screenshot.png ~/Shots/$DATE.png
scp ~/Shots/$DATE.png user@hosting.com:/home/user/public_html
echo "http://www.hosting.com/shots/$DATE.png" | xclip -se c

Bunny

Filed under Blog, Linux, Paltas · Tagged with

Comments: