Last active
May 29, 2019 06:47
-
-
Save camme/c545fb41e1087aea2ed6d70f46e913ca to your computer and use it in GitHub Desktop.
Take screenshots on your mac from all your monitors and save them datewise. Use it together with cron.
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 | |
set -e | |
EXEC_PATH=/usr/sbin/screencapture | |
FOLDER=~/Pictures/journal/$(date +"%Y")-w$(date +%V)/$(date +'%Y-%m-%d') | |
mkdir -p $FOLDER | |
FILES="" | |
for screen in screen1 screen2 | |
do | |
FILES="$FILES $FOLDER/screenshot-$(date +'%H-%M')-$screen.jpg" | |
done | |
$EXEC_PATH -x $FILES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to trigger screenshots every 30 minutes
Create the file and
chmod +x take-screenshots.sh
run
and add the following line