All builds

Mac app / 2026 / In progress

MonitorMate.

A Mac app that puts a saved monitor layout back after sleep or a reconnect, and leaves changes made on purpose alone

The hard part
Telling displays that slipped out of place after sleep or a reconnect from displays you moved on purpose.
Works today
The restore rules and the Keep and Revert fix are written, and I checked them by reading the code, not yet on real monitors.
Role
Software engineering
Built with
Swift · SwiftUI · AppKit · Combine · CoreGraphics · JSON · XcodeGen

01What I built

The problem.

Extra monitors can come back in the wrong places after a Mac wakes or a cable is plugged back in. A tool could simply force a saved layout back every time. But that would also undo a change you made on purpose in System Settings. A quick unplug and replug can also end with exactly the same displays as before. Then the list of displays looks unchanged, so comparing the list shows nothing.

What I built.

MonitorMate first works out which displays are connected. Then it finds the saved profile, a small A technical wordJSONA common text format that programs use to send each other structured data. text file, for exactly that set of displays. Before it puts the layout back, it checks whether any display has moved out of place. It moves the displays through Core Graphics, the part of macOS that controls them. When displays change, macOS sends a quick burst of signals. MonitorMate waits 1.5 seconds for them to settle, and keeps a note of why it needs to check. You change a layout by hand in a separate draft. The draft has three buttons, Apply, Keep and Revert, and a ten-second countdown.

The app

Swift, SwiftUI, AppKit, Combine, Core Graphics

Settle timer
Gathers the display signals from macOS for 1.5 seconds. It remembers if any of them came from a wake or a reconnect.The storyNoticing a monitor reconnect when the display list looks unchanged
Profile store
Saves each layout as a small text file. It finds the right one for the current setup by a fixed fingerprint for each display.The storySaving only the display layout you choose to keep
Auto-fix rules
Checks what caused the change, the main auto-fix setting and the matching profile. Then it checks that no layout is already being applied, and that the displays really moved.The storyNoticing a monitor reconnect when the display list looks unchanged
Display service
Places the main display at the zero point the others are measured from. Then it asks macOS to move the displays, and reports any failure.
Layout draft
Keeps three things apart. These are the draft you are editing, the layout you had before and the saved profile.The storySaving only the display layout you choose to keep

02The journey

What broke, and what changed.

Broke, then fixedA decisionA milestone

  1. 01 of 04Decided

    Put a layout back only for an exact match, and only after a real change

    The questionMonitorMate keeps a MonitorMate · The appProfile storeSaves each layout as a small text file. It finds the right one for the current setup by a fixed fingerprint for each display.See it in the map above, a layout, for each set of displays. But a layout that differs from its profile is not always a mistake. I may have moved the displays on purpose. Or I may have plugged in a different set of monitors.

    What I choseSo a profile is used only when three things are true. Every connected display matches the profile. The Mac has woken, or a display was connected or removed. And the displays have moved MonitorMate · The appAuto-fix rulesChecks what caused the change, the main auto-fix setting and the matching profile. Then it checks that no layout is already being applied, and that the displays really moved.See it in the map above. The cost is that I need a profile for each setup.

03Today

Where it stands.

I have checked these rules by reading the code, not on real hardware. Next I will test them on real monitors, across different docks and displays. The tests will cover waking from sleep and quick reconnects. They will also cover a missing display and displays moved on purpose.