69

Pretty much every application I use in full-screen (including Firefox, MacVim and the Terminal) have tabs on the top of the screen.

The problem is, when I move my mouse to reach the tabs I'll often accidentally touch the top of the screen, bringing in the OS menu OVER the tabs:

Illustration - moving mouse to top of screen in fullscreen apps makes menu bar appear

Is there any way to change this behavior? I'd prefer it if the menu bar would stay hidden when I'm using a full-screen app, even if my mouse does touch the top of the screen.

  • 5
    Yeah, this is really annoying. I wish there where a defaults write variable one could edit. But so far I've not heard about anything like that. It is especially annoying when using a VM in full screen. Ubuntu has the menubar at the top and I like it that way. But I'm constantly triggering the OSX menu bar to appear. :( – gentmatt Nov 8 '12 at 15:25
  • There is ONE thing you can do, but it sacrifices using the menu bar entirely - i.e., in addition to stubbornly hiding it, you can't even manually activate it (via the keyboard shortcut Ctrl+F2) or, it appears, operate any of the menu bar's items via their assigned keyboard shortcuts, either :(. But it DOES get rid of the menu bar out-right if you really want to get rid of it for a specific program. Download 'PresentYourApps' (it's on CNET), run the app you want to remove the menu bar for, run PreentYourApps and set the options for that app accordingly. It'll modify the app and restart it. – user46942 May 10 '14 at 9:13
  • 4
    Ok further info: what 'PresentYourApps' does is basically set the LSUIPresentationMode or 'Application UI Presentation Mode' value in the Info.plist for the app in question: documentation here and a guide at Lifehacker here. Instead of '4', use numeric value '3' for 'All hidden' mode, which is what my above comment's steps do in that easier GUI - but again, 'All hidden' annoyingly disables ALL access to the menu bar when in that app, while 'All suppressed' DOES hide the menu but the mouse invokes it when hit top of the screen, which we don't want. – user46942 May 10 '14 at 9:57
  • 3
    if only we could specify a bigger delay... this is really annoying – Lucas Pottersky Mar 10 '17 at 17:15
  • 1
    As a workaround solution, someone could write an app that makes a "wall" to prevent the mouse from ever hitting the top row of pixels on the screen (unless a key is held to "release" the mouse.). Something like this would be an acceptable first step and the reason for my bounty. – cloneman Jan 29 '18 at 14:13
9

The menu bar can NOT be hidden on command whenever you like to due to limitations in Mac OS X. Apple can do this in their own programs but they have NOT made it possible for other developers in Mac OS X. One of the reasons being that Apple Menu sits on the Menu bar and is helpful if the application becomes unresponsive or if the user needs to log off /shutdown the machine.

There is an application called Menu Eclipse which lets you change the Menu Bar behaviors(except for hide it).

  • 1
    "Menu eclipse" doesn't hide the menu bar. – Ring Ø Dec 11 '14 at 8:15
  • 1
    the menu bar could be triggerable by a keystroke or by a longer pause - this would still allow for the user to break out of a broken app while also not interrupting their tab based work flow – Toni Leigh Oct 22 '15 at 6:47
  • 1
    This can't be 100% true, since there are a lot of full screen games which don't allow you to access the menu bar. Although they are presumably using non-standard functions for full screen. – Wowfunhappy Aug 31 '16 at 16:59
  • @Wowfunhappy I would assume that is the result of running applications in the game mode. – Zeus Aug 31 '16 at 18:39
  • Okay okay, and what about Command + Option + Shift + Esc? When app becomes unresponsive, shutting down the machine does nothing until the application responses. So menu bar should not be a must when fullscreen. – Máxima Alekz Apr 18 '18 at 14:15
8
+250
  • Save the following AppleScript to a file named fullscreen.scpt:

    use framework "AppKit"
    use scripting additions
    
    repeat with runningApp in current application's NSWorkspace's sharedWorkspace's runningApplications()
        if runningApp's isActive()
            set frontApp to (localizedName of runningApp) as text
            exit repeat
        end if
    end repeat
    
    tell application "System Events"
        tell process frontApp to set isFullScreen to value of attribute "AXFullScreen" of first window
        if frontApp = "Finder"
            tell process frontApp to set value of attribute "AXFullScreen" of first window to not isFullScreen
        else if isFullScreen
            do shell script "lsappinfo setinfo -app " & quoted form of frontApp & " ApplicationType=Foreground"
            tell process frontApp to set value of attribute "AXFullScreen" of first window to false
    
            (*fix to make sure the menu bar is not stuck*)
            delay 0.42
            tell application "Finder" to activate
            tell process frontApp to set frontmost to true
        else
            do shell script "lsappinfo setinfo -app " & quoted form of frontApp & " ApplicationType=UIElement"
            tell process frontApp to set value of attribute "AXFullScreen" of first window to true
        end if
    end tell
    
  • From terminal, compile it to an application with the following command:

    osacompile -o "/Applications/Full Screen.app" fullscreen.scpt
    
  • Open the Full Screen.app's Info.plist (e.g. vim '/Applications/Full Screen.app/Contents/Info.plist') and add the following to the dict:

        <key>NSUIElement</key>
        <true/>
    
  • Add Full Screen.app as an exception in System Preferences > Security & Privacy > Privacy > Accessibility.

  • Launch Automator and create a new Service.

  • Change "Service receives" to "no input in any application".
  • Add a Library > Utilities > Launch Application action.
  • Configure the action to launch the previously created Full Screen application.
  • Save the service as Full Screen and close Automator.
  • On System Preferences > Keyboard > Shortcuts > Services, scroll down to the bottom of the list and the just created Full Screen service should be listed there. Associate an unique Command shortcut for it, like Shift+Command+\ or Command+F11 for example.

This creates a shortcut to cause an application to enter full screen while removing the menu bar, or to exit full screen bringing the menu bar back. It provides an alternative full screen shortcut!

For application-specific full screen launchers, check my other answer.

Caveats

There may be some disadvantages and/or misbehavior using this approach:

  • It works by setting ApplicationType=UIElement, which causes the application icon not be added/highlighted in the Dock and make the application inaccessible via Command+Tab. The Command+Tab issue was reported in comments, I didn't notice it since I mostly use the Mission Control overview to change between full screen applications.
  • It may not behave as expected for some specific applications, I've noticed issues with the Activity Monitor application (which is generally not used full screen anyway) and there's a report on Chrome, which I didn't try since I use Firefox and it works great.
  • This is more than sufficient for the bounty. Excellent work! For future users, please edit to describe any potential limitations when you find them. Off the top of my head, it seems that chrome doesn't like this very much, and also, the apps disappear from the cmd+tab when using this shortcut. – cloneman Feb 1 '18 at 19:08
  • @cloneman Nice, thanks. I've added a Caveats section. – pepper_chico Feb 1 '18 at 20:11
  • always get error: this script contains uncompiled changes and cannot be run. (-2700) – Xin Meng May 22 '18 at 6:46
  • This solution doesn't work for me, and I'm on macOS Sierra 10.12.6. The error window says: Can't get window 1 of <<class prcs>> "Full Screen" of application "System Events". Invalid index. And then is also says: System Events got an error: Can't get window 1 of process "Full Screen": Invalid index. (-1719) – rm.rf.etc Nov 22 '18 at 2:06
  • @rm.rf.etc I'm still using it on Sierra, working fine. – pepper_chico Nov 22 '18 at 7:03
5

The closest solution I've found is to do as mentioned earlier, disabling "Displays have separate spaces" in Mission Control. This only makes sense in a multi-monitor environment, as the menubar still shows on the primary monitor.

If you make the app "go fullscreen" (click green button), it fills the whole screen, but all other screens go black, and the menubar gets moved to the app's screen. So the solution there is to manually expand the app's edges as far or high as you want. Once upon a time, VMWare had some kind of full-screen workaround that didn't use Apple's full screen mechanism.

Unless/until Apple sees this as a problem that needs fixing, you're going to be hard pressed finding a non-hacky solution. It is so integral to how the operating system works (like the home-button on the iPhone/iPad/iPod).

-1

One possible solution is not to get rid of the menu completely, but actually keep the menu always on (it's not that big), and just get rid of the Dock instead, by doing the following trick.

Go to terminal and type:

defaults write com.apple.dock tilesize -int 1
killall Dock

This will make your Dock small. The press ⌘ ⌥ D to hide dock.

Idea stolen from here.

  • Downvoting this answer below zero is really mean. It could help people with the similar problem, but now they will ignore it, assuming that this solution doesn't work at all. My goal was to optimize for the screen space while not having the irritation with the tabs in the browser and code editors. None of the other answers above worked for me, but entirely getting rid of the Dock made me happy. – Alex Jun 29 at 6:48
-1

Try to use hotkeys for switch tabs in browser/ide so you'll never move your mouse into the top to menubar appear

You must log in to answer this question.

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