Dark Mode Yosemite

Dark mode is one of the more popular features of OS X Yosemite, because it allows you to add a dark tint to both the dock and the menu bar on Mac. The standard way to enable dark mode involves venturing to System Preferences, opening the General section, and clicking on the enable dark mode option. But wouldn’t it be cool if you could toggle dark mode using a simple keyboard shortcut?

To enable the dark mode keyboard shortcut, do the following:

Step 1: open Terminal

Step 2: paste the following command in the Terminal window:

sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool true

Terminal Enable Dark Mode Keyboard Shortcut

Step 3: press Return on your keyboard and you’ll be asked to enter your administrator password

Step 4: log out of your Mac by going to the Apple menu and clicking Log Out (you can restart if you prefer)

Step 5: log back in and press Control+Option+Command+T to toggle dark mode on or off

Once you enable the dark mode keyboard shortcut, you can use the shortcut permanently going forward. If you ever want to disable the shortcut, simply follow steps 1-4, but replace the word true in step 2 with the word false. So your command would look as follows:

sudo defaults write /Library/Preferences/.GlobalPreferences.plist _HIEnableThemeSwitchHotKey -bool false

I think you’ll find that it’s much easier to use a keyboard shortcut to toggle dark mode on and off than it is to go to System Preferences → General every time you wish to switch. What do you think?

  • Chris

    If you want you can also get a settings bundle that allows you to put dark mode on a timer.

    It’s called Lights Out.

    • Andrew

      Or you can use F.lux

  • I use flux with the “OS X Dark Theme at Sunset” option enabled…

    • Brian May

      Now that’s sweet AF!! Would love to see more OS X time saving, command line, productivity tips like this on iDB. Great job pushing more of this stuff out recently Jeff

  • koffas ss


    I´m stuck on the dark mode after doing this. I followed step 1-4 and it worked great, but the problem was that I was that when I had the dark mode of it was still on, let me explain. The menu bar was not dark mode but the rest of the Mac was, the Dock, the menu bar apps etc. So I wanted to disable it and followed step 1-4 again but with false instead of true (i copied the terminal-command at the bottom,

    But now I´m stuck on the dark mode, if I go to settings -> general and uncheck “Use dark menu bar and Dock” nothing happens, then I close the settings-app and reopen it and it´s still checked even that I unchecked it, it´s the same result every time.

    I have logged out, I have restarted the Mac but nothing helps. Please help!

    I got and MacBook Pro late 2011 with the latest OS X on it.

    • Do you have Lights Out installed? If so, uninstall it.

      • koffas ss

        I had it and I guess that´s why this happened. But now it´s deleted and I still can´t turn off the dark mode. Any suggestion?

  • Jonathan

    Keep the Mac tips coming, Jeff. I’m a new Mac user so I need it. By the way, did you ever get your new BookBook for your phone? I wouldn’t mind seeing a post about your experience with the new BookBook case