Skip to content

Instantly share code, notes, and snippets.

Last active May 6, 2022 02:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Script to turn on/off light for videoconferencing automatically. Requires a Mac, Oversight, and Shortcuts app.
# To use this script:
# 1. Save it on your Mac hard drive somewhere convenient.
# 2. `chmod` its permissions to make it executable. E.g. `chmod 755`.
# 3. In the Shortcuts app, create "Start Conference" and "End Conference" shortcuts that activate lights
# and do whatever else you want to happen when conferences start and end.
# 4. Download and install Oversight to watch for camera activation/deactivation:
# 5. Configure Oversight's "action" panel to run this script. Turn on the option that passes arguments.
# I realize this is hacky. Smart parameter parsing is left as an exercise for the reader. :)
case $device in (*"camera"*)
case $event in (*"on"*)
shortcuts run 'Start Conference'
case $event in (*"off"*)
shortcuts run 'End Conference'
# This was inspired by Edward Anderson's article; thanks, Edward!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment