Most days my screen is a competition for my attention, some of it my own doing (juggling various apps and agents) and some of it engineered by people whose business depends on interrupting me. I wanted a way to pick one window to focus on and quiet the rest: not to close anything, just to make a single app the only thing in view.

I assumed a tool like this existed and went looking for it. I didn't find one, or at least not one that did what I pictured. I probably could have kept digging, but building it myself with agentic coding tools took about as long as a proper search would have. Most of the effort went into defining and iteratively refining what I wanted in the interface, and that is the same work a search demands: you only learn your real requirements by trying candidates and seeing where they fall short. The whole thing came together in about 250 lines of Lua, with no purchase and no subscription, and it was exactly what I had imagined.

The result is Zen Mode, a Hammerspoon script for macOS. Press a hotkey and the frontmost window glides to the center of the screen and grows to full height, while the menu bar, the dock, the wallpaper, and every other window gently dim behind it. Press the hotkey again, or Escape, and everything returns to where it was.

Why not just use full-screen mode, which macOS has had for years? Full-screen stretches a window edge to edge, and for most of what I do that makes things worse: text lines run too long, or the app fills the extra width with empty space. Some apps have their own focus modes, but not all of my daily drivers. I designed Zen Mode to apply across all macOS apps, to move the window front and center while preserving its width, and to softly dim everything around it, leaving the window in a spotlight. When you're done, the lights come back on.

The first version was rough around the edges, literally: the window's border glowed against the black backdrop until I inset the cutout enough to mask it. The animation needed refinement as well. Moving, resizing, and fading all at once looked jerky, so the choreography now happens in two phases: the window glides to center as the backdrop fades in, then grows to full height. Even with the most powerful frontier models, none of this was delivered automatically. Coding agents can't read my mind (or even anticipate what would feel jarring), so they can converge on a great solution, but only with careful hand-holding.

The code is public, and you're welcome to try it. Installing it is a matter of pasting the script into your Hammerspoon config. Here's the repo:

https://github.com/cabeen/zen-mode

I think agentic coding tools open up a new kind of personalized, on-demand software. You may want a different zen mode, and the same tools that built mine will build yours. I'd only recommend staying in the loop and not relying on the first pass, no matter how fabled the model may be.