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.

💬 Reply by email     ⭐️ Also on micro.blog
Carlo Zottmann @czottmann