Screenshot with date and Countdown

Install: save code to /usr/bin/screenshot
Usage: $ screenshot 5
five us for 5sec countdown

#!/bin/sh
if [ $1 ]
then
	scrot -cd $1 "%Y-%m-%d_`echo $(date +%H-%m-%S)`.png" -e 'mv $f /home/modinfo/shots/'
        echo "Screenshot save in: /home/modinfo/shots/`echo $(date +%Y-%m-%d_%H-%m-%S)`.png"
else
	scrot "%Y-%m-%d_`echo $(date +%H-%m-%S)`.png" -e 'mv $f /home/modinfo/shots/'
        echo "Screenshot save in: /home/modinfo/shots/`echo $(date +%Y-%m-%d_%H-%m-%S)`.png"
fi

Leave a Reply