Mac GeekeryGet your geek on. |
|
blog advertising is good for you
recent popular content
User login
|
Andrew Klein asks: QuestionFirst of all, I love your site and it has helped me on countless occasions. I have a problem that I hope you can help me out with, and I searched the site and didn’t find it before. I use iGetter to handle my downloads, and I set it as a startup item. However, I find that the iGetter icon is annoying in my dock, especially when I am not downloading anything. Do you know of any way to run it, or even better, any application, from the menu bar? For instance, just the icon appears in the menu bar instead of in the dock. Is this possible? If so, how would it be done? AnswerAfter a fashion, it can be done. Sometimes. Before we get into it, though, a few words about the implications. The Dock controls almost all aspects of application switching. If you hide an application from the Dock, close all its windows, and it doesn’t have any other visible UI elements, it might wind up running in the background with no way to regain focus. Sometimes you can force it to the front using Activity Viewer, but sometimes you can’t. An <key>LSUIElement</key> <string>1</string> In most cases, LaunchServices must be updated for this change to take effect. The easiest way to do this is just to move the app to another folder, but there are other ways (I’m sure Adam will throw in some archaic UNIX-foo in the comments). On launch, most apps will now be invisible to the Dock. Note, however, that some apps interact with their Dock icon programmatically and setting LSUIElement can cause odd behavior. Apps in this category may ignore LSUIElement or they may just break entirely; each case depends completely on what hijinks the developer is pulling off under the hood. Oh, LSUIElement hides the menubar, too. So you’re stuck with only buttons/functions you can reach in the UI.
About JC
Author Biography JC is a former Mac Genius and Mac-centric IT worker with a background in print advertising. He earned a reputation as a miracle worker when he saved the day at a new business pitch with the arcane knowledge that Apple’s ADB cables were nothing more than poorly shielded S-Video cables. JC runs the Heroic Efforts Data Recovery Service and writes Ungenius, a tawdry tale of the life and times of a former Mac Genius. You can contact JC via IM or via the contact form. |
all it did was change the app’s dock icon to the regular application icon (paper, pen, pencil).
I just tested this with the latest iGetter and it works just fine. you did it wrong.
yeah, i did do it wrong. sorry, and thanks for the promt response!
What’s the difference between LS and NSUIElements?
as far as i can tell (and this i found empirically; I couldn’t find the documentation (nor did I look horribly hard)), LSUIElement hides the menubar and dock icon, but launches the app normally otherwise, while NSUIElement does so and leaves does not bring the app to the front.
Can you still access the application via apple-tab ?
No
this will also break the signed application status for certain apps, like safari, such that they will no longer be able to access the keychain, so be careful.
I don’t think anyone wants to get rid of the icons to actual applications they interact with that has more functionality than just loading and doing its job by itself. For instance, I’ve recently started using iVol to quickly change the volume level in OS X by simply using my mouse’s scroll wheel. This is so much handier than going up to the icon at the top of the screen and doing it, or reaching up and pressing the key combination. I just have to push the scroll wheel and rotate it up or down. Once the volume slider pops up, I can un-push the scroll wheen button and just rotate it up or down. When I’m done, I just move the mouse off the window and it fades away!
But, it came with an ever present icon in the dock. This string in the plist makes it go away. Very nice!