Friday, August 31, 2007

Terminating Apple's Dock with extreme prejudice

I've been using Mac OS X since late 2002 - five years now, I guess. In all that time, I've been trying, on and off, to do without the Dock. I've tried various little apps I've downloaded here and there, and none of them were white what I was looking for. (There's that whole "it doesn't work" thing that irked me about most of them.)

The closest I'd ever found that actually worked was setting the dock size to minimum and using TinkerTool to move it to the top of the screen, just below the menu bar. That worked, middling well, but the damn thing would still pop up if you were too slow in moving the mouse over it.

Now, however, I've figured out a working way to do it. All it takes is a bit of Terminal work, and the Dock is dead. Here's how it works.

in Terminal, enter these commands:
cd /System/Library/CoreServices
sudo mv
sudo killall Dock

The first line is not necessary, but I use it to get into the CoreServices directory. That way, I can use relative paths when moving/renaming the dock, and save a few keystrokes.
The second line renames the Dock, and the third line kills it. Ding-dong, the dock is dead, the wicked dock is dead!

To reactivate the Dock, use these commands:
cd /System/Library/CoreServices
sudo mv
sudo osascript -e 'tell app "dock" to activate'

Now for the drawbacks.

1: the built-in command-tab app switcher is part of the dock. No dock, no app switcher. No problem, I've got LaunchBar, Keyboard Maestro and DragThing installed, each of which has its own version of an app switcher.

2: window minimizing is also tied into the dock. With the dock gone, I can't minimize windows. Bummer, that, but then again, since I only minimized a window once or twice a month, big whoop.

3: Expose is missing in action. Big deal, I've never used it.

4: Apparently, the Finder Desktop is also connected to the Dock. Path Finder's desktop as well, it seems. Again, big deal. I don't use the Desktop.

I've come up with/found workarounds for items 1 and 4. At the moment, I'm using Keyboard Maestro's app and window switchers.

As long as the Dock runs, the Desktop is accessable, even if you turn around and kill the Dock shortly afterward. I found this short how-to on starting/killing the Dock and making the Desktop workable.

Step 1: write a small applescript:
tell application "Dock"
end tell

Save it as an application.

Step 2: move or copy the Dock to /Applications (or wherever else your fancy leads you).

Step 3: put both the Dock and your dock-killing applescript application into your startup items, making sure that the Dock loads well before the dock-killer.

I have no workarounds at present for the lack of window minimalization or expose's failure to work without the Dock, and I probably won't work on them too hard, since I don't use either one.

Need I add that like all system hacks, you should make backups before starting? If you try this at home, I am not responsible for any loss of data, productivity, or if your Mac OS install turns into Windows Vista.

No comments: