Skip to content

Instantly share code, notes, and snippets.

@narfdotpl
Created April 8, 2024 18:20
Show Gist options
  • Save narfdotpl/e4d808ec1049590dd67fd51d5fc9c588 to your computer and use it in GitHub Desktop.
Save narfdotpl/e4d808ec1049590dd67fd51d5fc9c588 to your computer and use it in GitHub Desktop.
Hammerspoon: switch between light and dark mode based on the ambient light sensor
hs.execute("open shortcuts://run-shortcut?name=" .. (hs.brightness.ambient() > 80 and "light" or "dark"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment