How to Toggle Macos Mojave Dark Mode Using Applescript

Because I was just hacking this into Keyboard Maestro a minute ago:

tell application "System Events"
  tell appearance preferences
    set isDarkMode to get dark mode
    set dark mode to (not isDarkMode)
  end tell
end tell

Have fun.

Carlo Zottmann @czottmann

👋🏼 Oh hello!

Sorry to be a bother, but did you know I make quite useful Shortcuts-related macOS & iOS apps?

Check them out!