Is there away to toggle an Application Icon in the OS X Dock? Specifically I was hoping to be able to use the 'deafults' command to toggle something within the given application.
If you want to remove the icon when the application is not running:
Click and hold (drag) it from the Dock, and release it somewhere else. If the application is running, the icon will move back to the Dock, but will disappear whenever you quit the application. If it's not running, the icon will disappear in a "cloud of smoke".
Alternatively, right-click the application icon in the Dock, and select Options, then toggle Keep in Dock.
If you want to also hide the icon when the application is running:
There is a way, but is presents two problems:
The application still responds to keyboard shortcuts defined for menu items, so if you're comfortable controlling the application only using these, it's possible.
It looks a bit like what opens when you select the "[Program Name] Help" menu item in the Help menu.
To accomplish it:
You need to edit the file
The file format is usually XML, which you can edit with any plain text editor, such as TextWrangler, BBEdit, TextMate, or even TextEdit.
Insert the following lines directly after the line containing
Save the file and restart the application.
In case the file format is not XML, but binary (the binary file starts with
Open the file in PLE, and select "Add Item". Type "Application is agent (UIElement)", which will autocomplete. Check the value box, and save.
|show 3 more comments|
Alternatively... (Building on the answer from @Daniel Beck)...
Open the same Info.plist in Xcode