THIS IS A PLUG-IN: it requires Locale from the Android Market.
NOTE: this will not work with Tasker (as previously stated), as Tasker does not support Locale condition plugins.
Change your settings based on your phone's dock state.
Works with Locale on Android 2.0 or higher on phones compatible with docks (e.g. Droid and Nexus One).
Email me if you encounter any problems.