I'd like to build an app that does not have a menubar, a dock icon, or sits in the app switcher. Basically, it should be like Quicksilver: I'd active it through a global hot key, say from Safari, and a little window appears, but Safari does not get inactive, neither does a different menubar show. I hope you understand what I mean...
How would I do that? I can prevent the dock icon, the app switcher, but I do not know how I can prevent the other apps from becoming inactive when my app's window shows or how I can remove the menu.
Thanks for any hints!
One low-key feature on Mac is the ability to auto-hide menu bar. To do this, open System Preferences > General. Check the option to “Automatically hide and show the menu bar” and the menu bar will immediately disappear.
1) Click the Apple icon to open the menu. 2) In the menu, select System Preferences. 3) Select Dock & Menu Bar from the next window. 4) In the window that opens, select the Automatically hide and select the Dock option.
Using a Keyboard Shortcut to Access the Menu BarUse Ctrl + F2 to focus on the menu bar. You may also need to hold the Function key if your Mac has one. Once you've focussed on the menu bar, use the arrow keys and Space or Return to select an item from the Apple or App menu.
On your Mac, move the pointer to the green button in the top-left corner of the window, then choose Enter Full Screen from the menu that appears or click the button . In full screen, do any of the following: Show or hide the menu bar: Move the pointer to or away from the top of the screen.
Try searching for "LSUIElement
". That should give you all the information you need.
(Specifically, this page in the documentation).
As Dave already said, add
LSUIElement YES
in your application's Info.plist file. That will get rid of icon and menu bar.
Then, to actually bring a window to the front at the appropriate time (e.g. when triggered through a global keyboard shortcut), you could do something like this:
ProcessSerialNumber psn = {0, kCurrentProcess};
SetFrontProcess(&psn);
[someWindow makeKeyAndOrderFront:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With