Hammerspoon alternative

A Hammerspoon alternative for window layouts, no Lua required.

Get the layout restore people script in Hammerspoon, ready to use in a few clicks.

SnapState is a $9.99 one-time menu bar app that saves and restores named window layouts with no code at all, including apps, the display layout and all browser tabs. Hammerspoon is a Lua automation tool that does nothing out of the box: you write ~/.hammerspoon/init.lua using modules such as hs.window, hs.layout and hs.screen.watcher.

Verdict: to get your windows, apps, display layout and all browser tabs back after sleep, wake or a monitor reconnect, SnapState does it in a few clicks and keeps doing it with no script to maintain. Hammerspoon can only do this once you write and debug the Lua yourself.

What is Hammerspoon?

Hammerspoon exposes macOS APIs for applications, windows, screens, keyboard events, Wi-Fi, audio devices and more to Lua. You can bind a shortcut to a series of window moves, watch for screen layout changes with hs.screen.watcher, and react to sleep and wake events. Ready-made plugins called Spoons cover common jobs. The latest release on GitHub is 1.1.1 (February 2026).

Every one of those jobs starts with a script you write and keep working across macOS updates.

Why do people look for a Hammerspoon alternative?

Restoring a full layout in Hammerspoon means writing and maintaining the script yourself: which app goes on which screen, at what size, and what to do when a monitor is slow to wake. Hammerspoon's own docs note that screen events that happen while the Mac is suspended may not trigger the watcher in some cases, so you often add delays and retries by hand. Browser tabs and relaunching closed apps are more code again.

SnapState replaces that script with a capture button. Arrange your windows, save a named workspace, and arm it to restore on wake, on monitor connect or disconnect, or when a matching display layout appears.

What does SnapState save?

Each workspace stores windows on every Space with their position and size, the apps needed to relaunch them, the monitor and display layout, and all open tabs in Safari, Chrome, Edge, Brave, Arc and Chromium after Automation permission is granted. Restore with a click, a Control-Command-1 to 6 shortcut, or an automatic trigger. When the display setup differs, saved frames are remapped onto the screens you have now.

Workspace data stays on your Mac as JSON. Version 2.7.2 is a universal build for Apple Silicon and Intel, needs macOS 15.7 or later, and updates itself through the built-in updater. Watch the demo video.

Can you use both?

Yes. Many people keep Hammerspoon for hotkeys and automations and let SnapState own the window layout job. SnapState is not a tiling or snapping tool, so it does not clash with scripts that move a single window on a shortcut.

What are the limits?

SnapState restores layouts across multiple Spaces (apps go back to the Space they were saved on, full-screen windows return to full screen, and windows on other Spaces are placed when you switch to them). Firefox is not supported, tabs are restored only from supported browsers, it is not a tiling window manager, and it needs macOS 15.7 or later.

SnapState vs Hammerspoon at a glance

CapabilitySnapStateHammerspoon
SetupClick to capture a workspaceWrite Lua in init.lua
Restore window positions and sizesYesYes, with your script
Restore on wake from sleepBuilt-in triggerPossible with a watcher you write
Restore on monitor connect or disconnectBuilt-in triggerPossible with hs.screen.watcher
Relaunch closed appsYesPossible with your script
Reopen all browser tabsYes (Safari and Chromium browsers)Not built in
General automation beyond windowsNoYes, very broad
Price$9.99 one-time, up to three MacsFree, open source (MIT)

Questions and answers

Do I need to write code to restore windows with Hammerspoon?

Yes. Hammerspoon does nothing out of the box. You write Lua in ~/.hammerspoon/init.lua to save positions, watch for screen changes and move windows back. SnapState needs no code.

Can Hammerspoon restore window layouts after sleep?

It can if you write the Lua yourself, for example with hs.layout and a screen or sleep watcher. Hammerspoon does nothing out of the box, so the layout, timing and edge cases are yours to maintain.

What is the easiest Hammerspoon alternative for window layouts?

SnapState. You arrange windows, save a named workspace from the menu bar, and choose when it restores: on wake, on monitor connect or disconnect, on a matching display layout, or with a Control-Command shortcut. No code is needed.

Does SnapState restore browser tabs?

Yes. It captures and reopens all open tabs in Safari, Chrome, Edge, Brave, Arc and Chromium windows, skipping tabs that are already open. Firefox is not supported.

How much does SnapState cost?

$9.99 one-time for up to three Macs, with a 14-day refund. It requires macOS 15.7 or later.

Get SnapState for $9.99One-time purchase · up to three Macs · 14-day refund