disper - for easily switching displays & resolutions on the fly in Ubuntu
Our home machine is our media watching box with an Nvidia GeForce 9500 GT with Nvidia driver version 270.41.06. We have an RGB-over-cat5 cable (another whole story which Edward will have to write about) running to the TV which acts as the second monitor in a TwinView configuration. The resolutions of the TV and primary monitor are slightly different which wasn't really a problem in Ubuntu Classic but since Unity there appeared a second menu bar on the primary monitor because of the overlap (Having the monitors in a left-and-right layout didn't work in practice either because when full screening Flash video it would full screen on the wrong monitor)
Since I don't really need to ever use both monitors at the same time I was looking for an easy way to switch between using either the primary monitor and the TV. Generally, when finding something to watch, one browses around for a bit and then buffer up the stream, full screen it and then go and sit down to watch. Opening nvidia-settings and going through a bunch of steps every time wasn't a good enough solution and having to restart X session would of course be a total no-no.
Then I found disper which is fantastic and works perfectly for me. It is a command line tool to change your display settings on the fly. I set this command to run when pressing ctrl+scrolllock:
disper --cycle-stages="-S -r 1360x768: -s" --cycle
(which means that each time that command is run disper will cycle between showing the secondary and primary monitors. I had to specify the resolution for the secondary monitor.)
Voila. Can sit back and enjoy the Daily Show. Disper will also prove useful at talks and presentations which are always preceded by ritualistic fighting with the projector.
