How can i remove an app icon on mac's application switcher (cmd+tab menu)?

17

8

On Mac's application switcher I want to hide particular applications such as adium and terminal (especially terminal). Because I use them with global shortcuts and they're always running.

Is there a way to do that other than using third party software?

Sinan

Posted 2011-06-15T00:47:18.430

Reputation: 227

Related, and another. – Daniel Beck – 2011-06-15T06:40:14.127

Answers

21

To do this, you can modify the Application's Info.plist file. To get to this file, either cd into the Application (Apps are just directories) or, in Finder, right click on the app icon and choose "Show Package Contents". Then edit the Info.plist file in your favorite text editor (Or the Property List Editor if you have it installed) and add the following text (or add in the appropriate key/value in Property List Editor).

 <key>LSUIElement</key>
 <string>1</string>

Note that not only does this hide the dock icon, but it also hides the menu bar. Unfortunately I don't know of a way to only hide the dock icon.

Source, yes, it's old, but presumably it still works. Let me know if it doesn't.

Wuffers

Posted 2011-06-15T00:47:18.430

Reputation: 16 645

Property List Editor is obsolete with Xcode 4, has been integrated into Xcode itself. It still works. – Daniel Beck – 2011-06-15T06:40:03.767

thx for that it does what you described, but i was using visor for terminal and it was giving the opportunity to have a hotkey for it and unf it stops working if i put that to plist. Seems like i'll continue having the icon in app-switcher. thx anyway.

– Sinan – 2011-06-15T15:24:19.867

2

This also breaks the code signing signature, which might affect updates or firewall settings. (You can verify using codesign -vvv /Applications/MyApplication.app) For command line options, see comments here.

– Arjan – 2013-08-16T10:27:03.673

2

Modifying the Info.plist is not really practical most of the time. It also removes the menu bar of the application. If the application is signed, editing the Info.plist usually breaks the code signature, so that for example the application won't be allowed to access items from the login keychain automatically. Some applications like TextEdit and Chess crash on launch if their Info.plist has been modified. The Info.plist might also get replaced if you upgrade the application.

(If you have seen different variants of <key>LSUIElement</key><string>1</string>, both LSUIElement and NSUIElement work, and <string>1</string> can also be replaced with <integer>1</integer> or <true/>. See grep -A1 [LN]SUIElement /Applications/*/Contents/Info.plist.)

Witch has an option to exclude applications by name:

I mostly switch between applications by using keyboard shortcuts or with Alfred. I have disabled ⌘⇥ and ⇧⌘⇥ with KeyRemap4MacBook:

<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | ModifierFlag::NONE,
KeyCode::VK_NONE</autogen>
<autogen>__KeyToKey__ KeyCode::TAB, VK_COMMAND | VK_SHIFT |
ModifierFlag::NONE, KeyCode::VK_NONE</autogen>

Lri

Posted 2011-06-15T00:47:18.430

Reputation: 34 501

0

If you are happy to have these programs start at startup, you can go to:

  • System Preferences
    • Accounts
    • Login Items

And then add the programs you want, and click hide. Viola, they will run, and not appear in the dock, or the Application switcher.

Frazer K

Posted 2011-06-15T00:47:18.430

Reputation: 9

2The hide checkboxes shouldn't have that effect at least on 10.7. They just make login items open on the background with no visible windows initially. – Lri – 2012-07-13T13:31:33.290