Home > Mac administration, Mac OS X > Programmatically hiding and unhiding the menubar in El Capitan

Programmatically hiding and unhiding the menubar in El Capitan

As my colleague @quovadimus82 has previously documented, OS X El Capitan includes a new option for showing and hiding the menubar.

This option is available in System Preferences, in the General preferences.

Screen Shot 2015 10 09 at 8 46 21 AM

Screen Shot 2015 10 09 at 8 46 27 AM

 

It is also possible to use the defaults command to set the menubar’s behavior. Here’s how you can set the menubar to be hidden and unhidden using defaults:

To hide:

defaults write NSGlobalDomain _HIHideMenuBar -bool true

Screen Shot 2015 10 09 at 8 48 08 AM

 

To show:

defaults write NSGlobalDomain _HIHideMenuBar -bool false

Screen Shot 2015 10 09 at 8 48 31 AM

 

Once run, logout and log back in to see the change in behavior. Alternatively, you can run the following command as the logged-in user to restart Finder and show the changes:

killall Finder

Screen Shot 2015 10 09 at 8 48 53 AM

  1. Alan
    October 12, 2015 at 8:15 pm

    Hello Rich,

    Thanks for your wonderful blog. Nearly every Mac Sys Admin has used your site at least once.

    I like this write up, but am curious if its possible to decrease the delay so the menu bar appears instantly, just like its possible with the dock like so:

    defaults write com.apple.dock autohide -bool true && defaults write com.apple.dock autohide-delay -float 0 && defaults write com.apple.dock autohide-time-modifier -float 0 && killall Dock

    Thanks again

    Alan

  2. hsm2237
    December 13, 2015 at 2:18 am

    Agreed Alan, have you found any way to reveal the menu bar faster with a terminal code? Thanks!!

  3. Ian Douglas
    December 13, 2015 at 2:09 pm

    I wish there was a way to mouse over the top bar and it reveals and sticks, and mouse over again and it disappears and stays disappears until you repeat the same. I like that I can hide it, but when I reveal it I want it to stay. I know I could do this Terminal commands, but I’ll love to be able to do it with a flick of the cursor to the top bar.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: