How to Enable and Disable OS X Yosemite Dark Mode with a Keyboard Shortcut
We’ve already discussed the new Dark Mode in OS X Yosemite, which gives the OS X Menu Bar and Dock a dark background, and shown you how to enable it in System Preferences. That method is fine if you just want to pick the default light mode or new dark mode and stick with it, or change it only infrequently, but what if you want to enable dark mode frequently and on the fly? Instead of a trip to System Preferences, here’s how to enable and disable dark mode in OS X Yosemite with a quick keyboard shortcut.
To set up your own OS X Yosemite dark mode shortcut, we first need to head to Terminal and modify a system preference file. Open Terminal from Applications > Utilities (or by searching for it with Spotlight) and copy and paste the following command:
sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true
Press Return to activate the command and enter your admin user account password (which is required in this case because we prefaced our command with sudo). You won’t receive any sort of confirmation as long as you entered the correct password.
Now, close Terminal, save all open documents on your Mac, and log out of your user account (alternatively, you can reboot your Mac if you want to). When you log back in, use the keyboard shortcut Control+Option+Command+T and dark mode will be immediately enabled. Use the shortcut again and dark mode will be disabled just as fast.
Not all users like the new Dark Mode look in OS X Yosemite and even those who do don’t want to see it all the time. By enabling this handy keyboard shortcut, users can switch between the dark and light “themes” (as Apple calls them) in a flash.
If, however, you’d like to disable Yosemite’s Dark Mode shortcut functionality, just use the command above again, but replace true with false at the end of the command. This will restore the default setting and you’ll need to visit System Preferences once again in order to change the light or dark theme settings.
4 thoughts on “How to Enable and Disable OS X Yosemite Dark Mode with a Keyboard Shortcut”
2. Is it possible to set the hotkey to an as yet unused combo of your choosing (ex: Cmd + g)?
I wrote an AppleScript to accomplish both above tasks (using FastScripts to enable the keyboard shortcut) however it takes about 3 seconds to run!
Even a point in the right direction is much appreciated. Below is my script:
tell application “System Preferences” to activate
delay 1
tell application “System Events”
tell process “System Preferences”
click button “Accessibility” of scroll area 1 of window “System Preferences” of application process “System Preferences” of application “System Events”
click checkbox “Use grayscale” of window “Accessibility” of application process “System Preferences” of application “System Events”
end tell
end tell
tell application “System Preferences” to quit
Thanks!