Created
March 6, 2015 14:36
-
-
Save rsnemmen/6f0a190c0d1fd0de6f93 to your computer and use it in GitHub Desktop.
Captures screenshots at regular time intervals and wakes up computer from screensaver
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 | |
# | |
# Captures regular screenshots and saves them to dropbox. | |
# Useful when I leave my linux box doing number crunching | |
# over long periods. | |
# | |
# t = number of seconds in-between screenshots | |
t=5400 # 1.5 h | |
while true | |
do | |
gnome-screensaver-command -d # wakes up from screensaver | |
sleep 15 | |
scrot -d $t '%Y-%m-%d-%H:%M:%S.png' -e 'mv $f ~/Dropbox/Screenshots/ubuntu/'; | |
ls -1t ~/Dropbox/Screenshots/ubuntu/* | head -n1 # prints last file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment