Skip to content

Instantly share code, notes, and snippets.

@skorotkiewicz
Created December 8, 2016 15:27
Show Gist options
  • Save skorotkiewicz/188073379a19f617f1a4e2347c1195db to your computer and use it in GitHub Desktop.
Save skorotkiewicz/188073379a19f617f1a4e2347c1195db to your computer and use it in GitHub Desktop.
Screenshot with date and Countdown
#!/bin/sh
#Install: save code to /usr/bin/screenshot
#Usage: $ screenshot 5
# five for 5sec countdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment