MacOS – Maintain allocation of windows to spaces on restart and external monitor unplugging

displaymacbook promacosspaces

I use spaces heavily and I have my windows arranged in a particular order. If I restart every application will be launched in the same space with many empty spaces.

If I unplug my external monitor, instead of adding those spaces to the others, the windows in them get resized and dumped into the macbook screen. They may or may not go back at funny sizes when the monitor is plugged back in.

I'd like to keep windows in specific spaces regardless of what else is going on.

Best Answer

There may be other options, but I’ve enjoyed using an app called Stay, from Cordless Dog: https://cordlessdog.com/stay/.

It takes a few steps to save and edit your window arrangement, but once you set it up, Stay handles plugging/unplugging of displays pretty seamlessly.

To set it up, you "store" window(s) for the current application, or all applications. These "stored windows" are saved for your current display configuration.

I don’t use Spaces regularly, but according to the docs for Stay, if you download the app directly from the developer, instead of the Mac App Store, the app does support Spaces: https://cordlessdog.com/stay/documentation/faq/#spaces

One tip: if you want all windows for a particular app to always be the same size and position of the current window you have open, use the "Match all windows" pattern after you store the window (look up "Window Title Pattern Matching" in the website Docs).