I’ve been using the excellent Finder replacement “Path Finder” recently, and so far I only have one complaint. While it allows you to enable the Finder’s “Remove from Dock” context menu option, it doesn’t offer any way to do this automatically. Unfortunately, Finder forces itself back onto your dock every time you log in. To fix this, I wrote a simple AppleScript to replace Path Finder’s login item.
Configuring Path Finder
The first order of business is to stop Path Finder from automatically launching on startup. You can do this in its preferences:
Next, make sure Path Finder adds the “Remove from Dock” option to Finder’s contextual menu in the dock:
Creating the AppleScript
Open the AppleScript Editor and save the following as a new script or application:
on run tell application "Path Finder" to launch repeat until application "Path Finder" is running delay 1 end repeat try tell application "System Events" to tell UI element "Finder" of list 1 of process "Dock" perform action "AXShowMenu" click menu item "Remove from Dock" of menu 1 end tell on error -- Suppress errors if Finder isn't in dock end try end run
System Preferences > Users & Groups > Login Items and add your script:
That’s all there is to it! Now when you log in, OS X will launch Path Finder and automatically hide the Finder icon from the dock.