Created
December 19, 2023 21:39
-
-
Save willmanduffy/1a44b8d622e1573a830b6815848aae7d to your computer and use it in GitHub Desktop.
List to camera changes
This file contains hidden or 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 | |
| log stream --predicate 'subsystem == "com.apple.UVCExtension" and composedMessage contains "Post PowerLog"' | while read line; do | |
| if echo "$line" | grep -q "= On"; then | |
| echo "Camera has been activated." | |
| fi | |
| # If we catch a camera stop event, turn the light off. | |
| if echo "$line" | grep -q "= Off"; then | |
| echo "Camera has been deactivated." | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment