[ download | release notes ]
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.
Download the proper version. If you are using Mac OS 10.3.x, you need Version 1.0.2. If you are using a Mac with an Intel processor, you need Version 1.1, which is a Universal Binary for Mac OS 10.4.x and later (it works just fine with Leopard too; I’ve been using it there for many months). Here’s an online copy of the Instructions which are also included in the disk images linked above. And, of course, DisplayWatcher comes with no warranty of any sort!
If you download and use it, please let me know... especially if you come up with interesting new scenarios!
This version has simply been recompiled as a Universal Binary using Apple’s new Xcode tools, so that it can operate properly and at native speeds on Intel-based Macs. Yes, it really was as easy as Apple promised it would be. It continues to work fine on Leopard as well.
I hope the third time is the charm. Apparently the builds that I had posted previously were compiled for debugging in such a way that they would run properly only on my own machine. That’s what happens when you’re just learning how to use a development environment... I’ve heard that the 1.0.2 builds do run, so please give them a try if you’ve had trouble with the others.
Oops. I couldn’t resist making some very nice improvements to the code right before posting it this weekend. My friend Mike Trent (as seen on CocoaDev.com) pointed out that there are now high-level AppKit events to replace some nasty low-level hackery I was using, which made the source a lot simpler, and enabled me to fix an irritating if minor limitation of the preference pane. But, that means the version I posted wasn’t the version I’d tested for so long, and it turned out I had broken the “on wake” detection. Dohh!
If you downloaded version 1.0.0 on Sunday, July 11, please replace it with version 1.0.1, and accept my humble apologies (and stunned congratulations for having found this app so quickly)!
This page was last modified Friday, 28-Mar-2008 10:29:09 CDT.
Return to Home Page.