I have an extra monitor hooked up to my iMac running Snow Leopard. This additional monitor is also used by my linux box, so I occasionally switch to VGA mode when I need to use the linux box.

My question is, how can I get OS X to quickly move to single monitor mode? You get the effect I'm looking for when you unplug the second monitor's mini DV plug - OS X will move all applications to the main monitor.

I'm looking for a programatic solution that I can map to a keyboard shortcut.

Any thoughts on this?

link|improve this question
feedback

migrated from stackoverflow.com Jan 17 at 6:13

This question came from our site for professional and enthusiast programmers.

2 Answers

Is the effect you want mimicked by "Gather Windows" in the Displays preferences pane? If so, you might have luck with a script similar to http://apple.stackexchange.com/questions/12769/trigger-gather-windows-programmatically-or-other-quick-way. Or, perhaps, http://hints.macworld.com/article.php?story=2007102012424539.

link|improve this answer
I REALLY like the first solution. The second one simply calls gather windows which doesn't actually move my applications to the main display. However, the first solution doesn't seem to work. I've enabled access for assistive devices but it keeps reporting that I haven't. – Jason Palmer Jan 16 at 17:48
Not sure if you need a reboot after enabling assistance? – Adam Wright Jan 16 at 20:30
Was already enabled when I looked – Jason Palmer Jan 17 at 4:28
feedback

For those having the same issue, I have found the solution that works for me:

http://www.alecjacobson.com/weblog/?p=1443

link|improve this answer
feedback

Your Answer

 
or
required, but never shown