Last active
August 22, 2022 20:57
-
-
Save arminrosu/af1ad5c331a890e52f744ad6788b896c to your computer and use it in GitHub Desktop.
Take iSight image and save to path
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 | |
# `brew install imagesnap` required | |
FILE_NAME=$(date +"%Y-%m-%d_%H-%M-%S.png") | |
FILE_DIR="/Users/[username]/Library/CloudStorage/GoogleDrive-[email]@gmail.com/My Drive/Photos/selfies/daily/$(date +"%Y/%m")" | |
echo $FILE_NAME | |
echo $FILE_DIR | |
mkdir -p "$FILE_DIR" | |
# Wait 2s for the camera to warm up | |
# Use absolute path | |
/usr/local/bin/imagesnap -q -w 2 "$FILE_DIR/$FILE_NAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trigger script via EventScripts on these events:
Screensaver stopped(will trigger with Screen password unlocked)