Related link: http://www.brunchboy.com/displaywatcher.shtml

One of my favorite features of Mac OS is how easily you can connect multiple displays, and spread your desktop between them. Heck, Microsoft even figured this one out after a decade or so. This means that when I’m at home, I like to have my PowerBook plugged into a nice big display, which has plenty of room to show the dock, while putting palettes like my DragThing window on the built-in display off to the side.

When I’m on the road, I have less real estate, so I like to hide the dock, and position a more compact DragThing configuration at the bottom of the screen, showing its own process dock.

Mac OS is very good about remembering the physical relationships between different displays that I connect, but I was still spending more time than I liked manually toggling the dock and switching between DragThing settings. So, being a typical proactively lazy geek, I decided to build a tool to do this for me. It would be a great excuse to learn a little Cocoa programming.

I’ve been using DisplayWatcher for a few months now, but I still get a little thrill out of watching the dock and DragThing reconfigure themselves, as if by magic, when I plug in or disconnect an external monitor. I also added the ability to run a script whenever my PowerBook wakes up from sleep–I use this to re-establish SSH tunnels for accessing and sending mail through my personal and corporate IMAP servers, CVS and the like. Now I’m far less reluctant to put my machine to sleep or move to other rooms, because there is no more hassle involved. That’s how a laptop should work!

Since DisplayWatcher seems very stable, I’m making it available for others who might find it useful. For now it is a binary-only download, but when I have time to write up some in-depth explanation, I hope to release it as open source as well. I certainly found it an instructive project myself, and would like to share that aspect as well.

If you’re interested, follow the URL associated with this posting and check out the instructions, or download it and play with it.

If you download and use it, please let me know… especially if you come up with interesting new scenarios!