AutoDisable/Enable Spaces Based on Monitor Config

Discussion in 'macOS' started by ender land, Feb 11, 2011.

  1. ender land macrumors 6502a

    Oct 26, 2010

    Quick question - I enjoy using spaces a lot with my MBP. Unfortunately I find it a hinderance when using multiple monitors. So what I end up doing is disabling spaces each time I am using an external monitor, then reenabling it when I am back to a single screen on my laptop.

    Is there a way to have this happen automatically? ie when I connect an external monitor spaces is automatically disabled and when I disconnect it, spaces becomes reenabled?

    Any suggestions would be greatly appreciated!

  2. ender land thread starter macrumors 6502a

    Oct 26, 2010
    Would this be something I could write a script to handle?

    It does not appear there are any quick fixes :(
  3. dvh13 macrumors newbie

    Feb 3, 2011
    This should be very possible using applescript. The script to toggle spaces on and off is pretty easy to do. A good short term solution could be to implement the script to toggle preferences on a keyboard shortcut, then work on getting it to switch automatically based on the number of monitors connected. I have seen something similar with disabling the airport when an ethernet wire is connected.
    In the past I have wanted this capability, but I didn't know anything about scripting at the time, and eventually forgot about this issue. (I stopped using spaces altogether as it was very annoying while working with two monitors.) I'm going to try to see if I can figure this one out. I'll let you know what I find.
    If you copy the workflow I attached to ~/Library/Services you can set a keyboard shortcut using system preferences. It simply toggles spaces on and off.

    Attached Files:

Share This Page