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.

2 Answers 2


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).

  • 1
    Just checked the spaces FAQ and the link seems to be gone. I then searched in their website, googe, twitter, etc... I didn't find a single mention they support spaces. I downloaded the app and no spaces support. :( Commented May 23, 2019 at 11:03
  • @alexandernst i've just submitted an edit updating the link to cordlessdog.com/stay/documentation/faq/#spaces Commented Jun 25, 2019 at 19:50
  • @TaylorEdmiston but does that mean that they finally support spaces? Because last time I tried, they didn't. Commented Jun 26, 2019 at 1:18
  • 2
    @alexandernst In my test it did not do what I expected. I tried with Numbers, running Store All Windows for Numbers with 3 sheets (1 on Space A; and 2, 3 on Space B), then I quite and relaunched the app. It did restore the windows position and size but left them all on the one Space that I relaunched the app in. My concern is more about keeping windows in their positions on their Spaces across a reboot, which Stay does not seem to solve. Commented Jun 26, 2019 at 14:47
  • 1
    I have tried "Stay" on my MacOS Mojave. It didn't work. I put few windows in different spaces, then I saved them. Then I closed them, went to a different space and tried to reopen those application. All application opened in the space I was currently in. Later I tried to restore windows, but nothing happened.
    – Valentyn
    Commented Apr 29, 2021 at 15:31

After some experimentation, I've been able to keep all windows in the proper spaces across unplug/replug by adding 1 extra blank space on my laptop screen.

While plugged in to external monitor, I have #1 on monitor and #2 & 3 on the laptop (call these 1a, 2a, 3a). #2a is kept blank.

Upon unplugging, there is some merging and rearranging of the Spaces happening:

1a + 2a -> 1b (This is why I left 2a blank)

3a -> 2b

End result when unplugged is my original stuff which was separated is still separated, I just don't have the extra blank display.

There's probably some way to extrapolate this merging behavior with more than 3 displays.

  • 1
    Nice solution that doesn't require a new app
    – dwanderson
    Commented May 11, 2017 at 20:59
  • One thing to note is you can more easily keep your first Space blank using Login Items and the "Assign To" option: superuser.com/a/1221401/454133 Commented Jun 21, 2017 at 13:31
  • 2
    My problem is that I have 2 monitors and my laptop, so 2 spaces that get merged onto my laptop. I wish it would just leave the spaces as spaces and give me 3 on my laptop, rather than merging them at all.
    – mvndaai
    Commented Feb 22, 2018 at 23:38
  • 2
    It's 2019. This problem is almost a decade old. How has Mac not solved this by now? Commented May 7, 2019 at 22:14
  • 1
    So, adding an extra blank space to each monitor seems to make this solution work for multi-monitor plugging/unplugging. But it doesn't help when opening a new window though. Sublime Text, for example, is still opening in the wrong space when I open a new window >:( Commented May 7, 2019 at 22:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .