I really love the 'auto hide menubar' option in El Capitan, but sometimes I like it (private) sometimes I don't (work). Is there a way to show/hide it programmatically by changed it's value in a plist file? If so, in which plist file is that setting found? Any help is appreciated.


A bit more details about the circumstances: I use applescripts or bash scripts a lot to automate certain mundane tasks, like opening all my professional applications when I arrive at work. Usually I even export an applescript as an application so I can run it with spotlight, thus by entering one simple command in spotlight, all the relevant apps open. I'd love to do be able to toggle the auto-hide feature like this. It doesn't matter that much to me if this is done via editing a plist file with bash commands or automating it in some way via applescript.

  • I think that Stack Overflow will be more appropriate for the programmatically side of your question. – StrawHara Oct 8 '15 at 11:18
  • As long as "programmatically" means AppleScript, shell scripts or similar methods, the question is totally on-topic on AD. Can you describe in more detail under which circumstances you want to show/hide the menu bar? – nohillside Oct 8 '15 at 15:02
  • I'm also thinking this isn't a SO question. Much better to keep it here IMO. – bmike Oct 8 '15 at 17:34
  • @patrix I added more details about the circumstances for clarity. – smelly586 Oct 9 '15 at 9:16

Here's how you can set the menubar to be hidden and unhidden using defaults:

To hide:

defaults write NSGlobalDomain _HIHideMenuBar -bool true

To show:

defaults write NSGlobalDomain _HIHideMenuBar -bool false

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

killall Finder
  • Thanks, this did the job. Only downside is the logout/login part (killall Finder works fine, except when you have many apps open, they need to be closed one by one) but I can live with that. – smelly586 Oct 9 '15 at 14:51
  • Please know that after this setting is applied, to see the changes take effect in any application, you must restart said application. – cody.codes Dec 7 '17 at 17:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .