Difference between revisions of "Hiding a macOS app from the Dock"

From Free Pascal wiki
Jump to navigationJump to search
(New page "Hiding a macOS app from the Dock")
 
m (→‎Hiding a macOS app from the Dock: Fixed duped heading :-)
Line 1: Line 1:
= Hiding a macOS app from the Dock =
 
 
 
There is no way to hide an application from the Dock at run-time, but the application can declare itself to be an ''agent''. macOS doesn't show agents in the Dock or in the Force Quit Applications window.  ''Agents'' are visible for utilities like ''Activity Monitor'', Unix command-line tools (eg top), as well as macOS API functions.
 
There is no way to hide an application from the Dock at run-time, but the application can declare itself to be an ''agent''. macOS doesn't show agents in the Dock or in the Force Quit Applications window.  ''Agents'' are visible for utilities like ''Activity Monitor'', Unix command-line tools (eg top), as well as macOS API functions.
  

Revision as of 12:54, 2 September 2019

There is no way to hide an application from the Dock at run-time, but the application can declare itself to be an agent. macOS doesn't show agents in the Dock or in the Force Quit Applications window. Agents are visible for utilities like Activity Monitor, Unix command-line tools (eg top), as well as macOS API functions.

Warning-icon.png

Warning: Agents are never shown in application's menu. So the agent application should provide StatusBar (TTrayIcon) user interface, hotkeys so they can be switched off, or should be launched/terminated by another GUI application.

For example, startlazarus is an agent, launched by the Lazarus IDE when rebuilt.

To declare an application to be an agent, open the application's bundle Info.plist file:

  • add a property LSUIElement (or "Application is agent");
  • set LSUIElement property's value to True (or check with the checkbox);
  • save the Info.plist file.

infoplistinside.png