Last active
May 12, 2024 09:56
-
-
Save mccaffers/c344a9df59b69c811d543481f0e565c5 to your computer and use it in GitHub Desktop.
Bash script to take a screenshot on macOS every minute, converts to webp
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
# Take a screenshot on macOS every minute | |
# converts the screenshot to webp to reduce file size | |
while :; | |
do | |
name=$(date +%m\-%d\-%y\_%H.%M.%S); | |
screencapture -m -D 1 -t png ~/Desktop/screenshots/$name.png; | |
convert ~/Desktop/screenshots/$name.png ~/Desktop/screenshots/$name.webp; | |
rm -rf ~/Desktop/screenshots/$name.png; | |
sleep 60; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment