DEV Community

Cover image for Automate Mojave Dark mode configuration
Anthony Ciccarello
Anthony Ciccarello

Posted on • Originally published at ciccarello.me

Automate Mojave Dark mode configuration

If you like to automate your macOS configuration via bash scripts and have recently
setup Mojave, you may be wondering how to enable dark mode, the configuration
is called "AppleInterfaceStyle" and can be set using the following command.

defaults write "Apple Global Domain" "AppleInterfaceStyle" "Dark"

If you would like to revert back to the default (light) theme, delete the key.

defaults delete "Apple Global Domain" "AppleInterfaceStyle"

Both enabling and disabling will require a restart of your computer to take
affect. If you would like to try out the theme immediately, open the General
tab of the mac preferences.

open /System/Library/PreferencePanes/Appearance.prefPane

Originally published Sep 25, 2018

Top comments (0)