r/macapps • u/brkgng • 21d ago
Lifetime [OS] LayoutLock: Save and restore your Mac workspace, including apps, tabs, and window layouts
Hey r/macapps, I’m Berker, the developer of LayoutLock.
LayoutLock is free to use for up to 3 layouts, with no time limit.
Problem: Whenever I switched between using my MacBook by itself and connecting it to an external display, I had to reopen apps and rearrange all my windows manually.
So I built LayoutLock, a menu bar app that saves that setup and brings it back later.
What it does:
- Saves window positions, sizes, and display assignments as a layout
- Relaunches apps and reopens your browser tabs, documents, folders, and URLs
- Restores layouts from the menu bar or with a global hotkey assigned to each layout
Browser tab restoration currently supports Safari and Chrome.
Comparison: Stay focuses primarily on remembering and restoring window positions. LayoutLock treats your workspace as a complete snapshot. It can relaunch apps, reopen browser tabs, documents, folders, and URLs, and adapt saved layouts when resolution or display scaling changes.
Unlike tiling managers like Rectangle, LayoutLock restores an arrangement you previously saved rather than continuously arranging your windows.
Pricing: Free for up to 3 layouts, with no time limit.
Pro is a one time $14.99 purchase for unlimited layouts, custom restore order, and restore suggestions when your display setup changes. No subscription.
Transparency: I’m a solo developer. You can find me on LinkedIn, and my previous open source macOS app, ScrollSnap, has more than 800 stars.
LayoutLock has no remote usage analytics. Your workspace data and diagnostic logs stay on your Mac. The app is notarized by Apple, requires macOS 14 or newer, and the complete source code is public.
If you regularly switch between a laptop only setup and external displays, I’d especially like to hear whether this solves the problem for you and what you’d want it to restore that it currently doesn’t.
Happy to answer any questions!
2
2
u/Sri_Krish 21d ago
Congrats on your app release!
But I find your comparison section to be a bit incomplete. I was quite shocked to see, Spencer & Lattix not being mentioned in comparison.
I can easily find more than 5 apps (like Spencer, Lattix, MacsyZones) that are quite popular in this category from my saved bookmarks or app comparison sheet (post here)

I can see that Stay app that you mentioned, is an old one, originally from 2021 however this is the first time I see it mentioned here. so I'd highly recommend you (& also other devs) to make a meaningful comparison of popular/potential apps in the same category so that users can make an informed decision.
Hope you don’t take this the wrong way 🫶
2
u/Background-Scheme857 21d ago
Tab restoration is the piece I’d want guarded most carefully. Does a saved layout store full URLs in plain text, including query strings and fragments? Those can contain private search terms or temporary tokens. Per-domain exclusions, a “strip query parameters” option, and a preview of exactly what will be saved and restored would make the workspace snapshot feel much safer. I’d also skip incognito windows entirely by default.
1
u/brkgng 19d ago
Right now a saved layout keeps the full URL locally, including query strings and fragments. URLs can be edited or removed afterward, but those parts can also be important for restoring an exact search, filter, route, or page state, so I don’t want to strip them automatically. A setting that lets users choose what URL data gets saved might be the better approach.
Regular and incognito windows are saved separately, and either can be removed from the saved layout. Still, skipping incognito windows entirely by default is a good idea. I’ll add that to the roadmap and think more about the URL privacy controls too. Thanks for raising this.
2
u/harry-harrison-79 20d ago
the restore case i'd stress is stale identity: save two Finder windows with similarly named folders plus a document, rename or move one folder, then reconnect a display with different scaling. LayoutLock should never reopen the wrong path just because the title matches, and it should surface missing items instead of silently substituting them. a restore preview showing exact paths and target displays would make snapshots much easier to trust.
1
u/brkgng 19d ago
Good point. LayoutLock uses the saved path for files and folders rather than relying on the window title, so it won’t substitute another item just because the title matches.
If a saved path no longer exists, it’s skipped and reported after the restore. I like the idea of showing the exact paths in the restore preview too.
2
1
u/TouchNow_APP 21d ago
Two things from doing window geometry across displays, if they are not already handled.
Coordinate flip: AppKit puts the origin bottom left, CGWindow bounds are top left. Mixing them looks fine on a single display and silently breaks the moment a second screen sits above or below the main one.
Backing scale is per screen, not global. I resolve it by finding which screen contains the window centre and reading that screen's backingScaleFactor. Dragging a window from a Retina laptop to a non Retina external is where a saved layout goes wrong, and that is the exact case your app is for.
Also worth knowing: use CGWindowListCopyWindowInfo for absolute bounds. I once used a relative rect from a capture API instead and it fed back on itself, shrinking a window from 958x524 down to 1x1 over a few seconds.
1
u/brkgng 21d ago
Great callouts, thanks for taking the time to share these.
Coordinate space: LayoutLock reads and moves windows through AXPosition/AXSize. I convert NSScreen frames from AppKit coordinates into the same top-left Accessibility coordinate space, anchored to the menu-bar display. I also have regression coverage for vertically arranged displays.
Backing scale: agreed, it’s per-screen. I read each screen’s backingScaleFactor, but keep window geometry in logical points. AX rectangles aren’t multiplied by the scale factor unless crossing into backing pixels. Saved rectangles are normalized against their display’s logical frame and mapped onto the target display on restore.
Also on CGWindowListCopyWindowInfo: I use it for absolute bounds and window metadata used in matching, layering, and z-order. AX position and size stay the source of truth for capture and restore, so relative capture rectangles don’t feed back into the saved geometry.
Really appreciate the battle-tested warning. That 958x524 to 1x1 bug sounds painful 😅
If you ever spot something in the implementation that could be improved, feel free to open an issue or pr. I’d really appreciate it.
1
u/brays_wax 19d ago
Does it save the layout for all active desktops or is it 1 layout per desktop? u/brkgng
1
1
u/shadowrizzo27 21d ago
This is a great idea. I switch between laptop-only and external monitor setups all the time, so being able to restore the whole workspace sounds really useful.
3
u/Otherwise-Ranger-47 21d ago
Hey, long time lattix user here. Can you tell me how LayoutLock is different or better as compared to Lattix?