Have you ever wanted the ability to hide the Dock and/or the menu bar on an application-by-application basis? That is, when you launch
iPhoto, the Dock is hidden, when you launch
both the Dock and the menu bar are hidden? This can be useful when working on a smaller screen with a program that requires most of the screen for its visuals, or if you just find the Dock and menu bar are cluttering your view of things.
While there are a number of third-party programs out that purport to do just this—
come to mind—it’s actually quite easy to do yourself. It just takes a couple of simple edits in one file within the given application.
As an example, I’ll change Stickies so that the Dock and menu bar both go into hiding when the application is launched. Note that they’re not lost for good—they’re simply hiding, and will reappear when you move the mouse into their typical locations. The key to this hint is a property list variable named
LSUIPresentationMode. By setting this variable to a certain value within each application’s
file, you can change how the Dock and menu bar behave within that application.
Whenever you do something like this, it’s a very good idea (read: do it!) to make a backup copy of the application in question. Make your modifications on the backup copy of the program, and then if something goes wrong, you’ll only have to delete the backup you created to get things back to normal.
To change how an application handles the Dock and menu bar, you need to find the program’s
file. These are always located inside the application bundle, so start by control-clicking on the backup copy of the app and choosing Show Pacakge Contents from the pop-up menu. In the new window that opens, open the Contents folder and you should find the
file. What you do next depends on whether or not you have Apple’s free Developer Tools, known as
Xcode is not installed
If you don’t have Xcode installed, the easiest way to implement this hint is to download and install Brian Webster’s
PlistEdit Pro, a third-party shareware application. This $24.95 program works much like the Property List Editor program included with Xcode. There’s a free trial period, so you can test it out yourself before deciding to buy. If you choose to use this program, skip ahead to the
Xcode is installed
section of this hint for the how-to.
If you’re still reading, that means you’ve chosen not to use a property list editor of some sort. That’s OK; this hint isn’t really all that tough to implement, but you will need a pure text editor such as TextEdit. Open your text editor, then drag and drop the
file onto the text editor’s icon in the Dock. If you’re using a copy of Stickies, as I am, then here’s what you’ll see:
To make Stickies hide the Dock and menu bar when launched, add the following two lines, just below the
entry on row four:
Save the changes, and you’re done. Jump down to
Putting it to use
to see how it works.
Xcode is installed
If you have Xcode (or PListEditor Pro), the changes are even simpler. With Xcode installed, just double-click on the
file and it will open in Property List Editor; PListEditor Pro users may have to use drag-and-drop to open the file.
Once it’s open in either editor, click once on the Root entry in the Property List section of the window, then click the New Child button in the toolbar. Set the name of the entry to
LSUIPresentationMode, the Class pop-up to Number, and give it a value of
4. Save the file, and you’re done with the editing.
Putting it to use
In the following short movie clip, you’ll see two versions of Stickies running. The first is the stock Stickies, and you can see both the menubar and the Dock remain visible when it’s launched. The second is my modified Stickies—when it’s launched, both the menu bar and the Dock vanish.
As you can see in the video, the menu bar and Dock both become visible again when you mouse into their respective regions, so nothing is lost for good. Note, however, that this trick will not necessarily work perfectly in every application—hide the menu bar in Photoshop CS2, for instance, and you may have issues selecting items in the menus. If you stick to Cocoa applications (typically those provided by Apple, plus many third-party apps such as those by OmniGroup), you should have good results. Modifying Carbon apps (such as Photoshop, BBEdit, etc.) may be more troublesome.
If you ever want/need to undo what you’ve done, just delete the backup copy of the app you modified, and you’re done. What, you didn’t work on a backup copy? Well, just open the
file in your editor of choice, and remove the two lines you added (or use the Delete feature in your property list editor application). Just make sure the program isn’t running when you do this. Save your changes, relaunch the program, and things should be back to normal.