I play the odd game or two under Linux and some games really, really hate running on a dual-screen system (using Nvidia TwinView), Either getting the resolutions completely screwed or having their windows or fullscreens positioned on one screen or the other, but the content of those windows pushed to the centre of dual-desktop meaning half the game is missing. The same thing occasionally happens only with mouse input in these games, rather than the graphics, so I can’t move the mouse past the invisible divide.
Anyway, fed up with this and wanting a simple one-click solution I knocked up a shell script that I run from a button on my panel. First of all, I did a simple toggle with xrandr, but found I’d occasionally accidentally click it and switch res, annoying the hell out of me so I knocked up a slightly less automatic version. It uses zenity to give me a choice of one of two resolutions (a single screen one or my dual-screen one) and then uses xrandr to apply the changes. I would just use the Monitors app, but it complains about not supporting the driver and I just wanted something click and simple (the Monitors app is slow to start, plus that annoying not-supported dialogue adds an additional click).
Here is the script: