I run ubuntu on my macbook pro, with nvidia proprietary driver.
I've made a little hack script http://www.coldcode.net/2010/05/nvidia-auto-display.html which detects the presence/absence of an external monitor and switches the resolution accordingly.
Does anybody know of a better way to do that?
My script also works around specific issues of the nvidia partial xrandr implementation; assuming a xrandr compliant xorg driver, is there a way to do the same thing in a less hackish way?
Have you heard of disper ( http://willem.engen.nl/projects/disper/ ) ?
Also has a PPA under http://launchpad.net/~disper-dev/+archive/ppa
I've found that running
gnome-display-properties
(on 10.04 at least) will automatically detect and configure my resolution based on the monitors I have connected at the moment. Then I can simply dismiss it (using the 'Close' button, 'Apply' works also but requires confirmation which takes another click and is unnecessary). So I've added an icon to my topbar and so far that's been so much better than resetting X like I used to do that I've been to lazy to look for a one click solution or even an automatic one such as your script.I have a large monitor at work but usually just use my laptop alone at home so its 2 clicks when I get to work in the morning and 2 when I get home.
Update:
Should have checked first. I'm actually NOT using the proprietary driver right now and I vaguely recall that's because having compiz effects was less important to me than not restarting X twice a day to switch monitors. So my answer may be completely useless to you. I'll delete if anyone can confirm that.