Menu

My Mac windows kept landing on the wrong Space after every monitor swap, so I wrote a small app for it
📰

My Mac windows kept landing on the wrong Space after every monitor swap, so I wrote a small app for it

DEV Community: productivity·Mingke Tu·4 days ago
#exj8hMnI
#devtoproductivity#devto#dev#monitor#back
Reading 0:00
15s threshold

I use a MacBook with one external monitor at a time, and I swap between a few monitors during the week. Every time I plug a monitor back in, macOS brings the windows back to that screen, but not to the Space they were on. Chrome ends up on desktop 3, Slack on desktop 1, and I spend the first few minutes dragging things around.

I wanted something that remembers, for each monitor, which Space every window belongs to. I couldn't find a tool that did exactly that, so I wrote LayoutKeeper, a small menu bar app.

What it does:

Saves a window layout per external monitor, keyed by the monitor's EDID, including which Space each window is on.

When that monitor is plugged back in, it moves windows back to their saved Space and position.

Tells Chrome windows apart by profile, so work and personal windows go back to the right places.

Adds brightness keys for external monitors.

What it doesn't do yet: when you unplug and go back to the built-in screen only, it doesn't restore a separate layout for that.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.