DisplayWatcher

DisplayWatcher is a neat application that helps you change your dock (and other) settings automatically when you plug/unplug an external monitor by invoking s upon display changes. It also has the ability to run scripts upon return from sleep mode (always nice for those tunnels).:

This page is referenced in: