← All writing

When a laptop lid becomes an input

Making one familiar gesture feel dependable.

macOSInteraction designProduct design
A cut-paper laptop with its lid half open, a paper protractor arc standing behind the hinge with one coral segment marking the angle.
The angle of the lid, read as an input.

UnfoldMyMac makes the desktop respond when you move a MacBook’s lid. Lower it and the screen frosts over or a pair of curtains closes; lift it and everything clears. I wrote about the interaction model in Designing interactions around a laptop hinge. This piece is about the less visible half of the work: making a physical gesture feel dependable when the hardware underneath it can’t always be relied on, and keeping a playful app polite on a machine people use for real work.

None of it needs code to explain, and most of it applies to any product that turns something physical into an input.

In short

  • Find out early which Macs can take part, and make “this Mac can’t do that” an ordinary answer.
  • Treat silence from the hardware as a real state, and do work only when someone can see it.
  • Let people anchor effects to how they sit, ask for permissions one feature at a time, and put safety ahead of spectacle.

Start by asking which machines can take part

The first surprise was how little the platform promises. macOS doesn’t give apps a documented, supported way to ask how far the lid is open, and not every MacBook can answer the question at all. Support varies by model.

That shaped the product before any effect existed. If an input might be missing, “this Mac can’t do that” has to be an ordinary answer, not a crash or a frozen effect. The app treats a Mac that can’t report the angle as a normal case rather than an error, and the UnfoldMyMac repository lists the current hardware requirements so people can check before they expect lid effects to work.

For any unofficial input

Find out early which devices can take part, write it down where people will see it, and design the “not here” state as carefully as the main one.

Treat “no answer” as a real state

A physical input doesn’t only fail by being absent. It can disappear for a while and come back. A Mac sleeps and wakes, and hardware it found a minute ago may need finding again. A position that was true a second ago may not be true now.

So the app never pretends. If it hasn’t heard from the lid recently, it says it doesn’t know, rather than holding the last position and drawing an effect that no longer matches the hinge. When the lid becomes readable again, it starts from the present instead of replaying the past. And when a Mac simply can’t report the angle, the app asks less and less often instead of trying again and again for as long as it runs.

That last point is easy to miss. Retrying is a sensible reaction to a brief glitch and a wasteful one to a permanent absence. Backing off gracefully is part of what makes software feel considerate on someone else’s machine.

Do work only when someone can see it

A desktop effect shares the computer with everything else a person is doing, so I treat its running cost as part of the design. UnfoldMyMac checks the lid often while an effect is actually on screen, much less often when the only thing showing is the angle in the menu bar, and not at all when effects are off and nobody is looking.

Live wallpapers carry the same responsibility in a different form: each one says what data it reads, whether that’s public GitHub activity, local coding sessions, network readings or weather. The previews on this site follow the rule too, and pause when they scroll out of view. If the lid isn’t doing anything useful, the app shouldn’t be either.

A dark blue Codex Mission Control wallpaper: a small robot on a pedestal, the line “Let me cook.” and two activity counters.
A live wallpaper built from local coding activity, shown with sample data. Each wallpaper says what it reads.

Let people decide where the effect begins

The most useful setting in the app came from noticing how laptops actually sit on desks. Very few people work with the lid flat open. Most keep it somewhere past upright. When I first mapped effects to the hinge’s whole range of travel, an ordinary working position already looked half folded.

So people choose where an effect starts, and the effect is anchored to how they sit, not to the hinge’s full range. Effects also finish before the lid is fully shut. The last part of a closing lid moves quickly and the screen becomes hard to see, so an effect that only completes at the very bottom spends its best moment where nobody can watch it.

No dead travel

As soon as the lid passes the starting point, something on the screen moves, however slightly. If a person moves an object and nothing responds, they assume it’s broken.

Shape motion so it reads as cause and effect

Closing a lid is one continuous gesture, and the effects treat it as two halves. In the first half, things move: curtains draw, frost spreads down from the top of the screen, a character slips out of sight. In the second half, they settle and fade. Reverse the gesture at any point and the story plays backwards from exactly where your hand is.

Red velvet stage curtains drawn back from a dark, empty stage.
The curtains effect. Lower the lid and they draw closed; lift it and they open again.

That split is a design choice more than an engineering one. Movement early on tells you the hinge is connected to the picture. The fade at the end makes the final state feel finished rather than abrupt. Apple’s Human Interface Guidelines on motion put it plainly: add motion purposefully, and don’t add it for its own sake.

Ask for permissions only when a feature needs them

Frost, the first effect I built, blurs whatever is actually on your desktop. That needs macOS Screen Recording permission, because the app has to see the screen to blur it. No other lid effect needs it, so no other effect asks. What Frost sees stays in memory, is never saved, and never includes the app’s own windows, so the overlay doesn’t blur itself.

Sound reactions in Hinge Garden, one of the creative scenes, follow the same pattern. The app asks for microphone access only when you switch them on. It keeps a sense of how loud the room is and nothing else; no audio is stored. Because a single knock on the desk shouldn’t turn the page, the scene responds only to sound that lasts, and it waits for quiet before it will respond again.

Explaining a permission

Tie it to one visible feature the person chose, and say what the app keeps.

Put safety ahead of spectacle

A full-screen overlay tied to a hinge can go wrong in uncomfortable ways, so the app is cautious by default. Lid effects appear only on the built-in display, and they pause when it’s closed, asleep, unavailable or mirrored to another screen. After any of those clears, the app waits for things to settle before effects return. It never keeps the display awake: if macOS wants to sleep, it sleeps.

Overlays let every click pass straight through to the windows underneath, so an effect can’t block work. Effects start switched off until a person turns them on. When Reduce Motion is enabled, continuous animation gives way to still states, in line with Apple’s accessibility guidance and its advice to make motion optional.

Other inputs follow the same rules

Hinge Garden uses the lid together with other things a Mac can sense. A glass snail carrying a tiny greenhouse emerges as you open the MacBook and retreats as you close it. Plugging in the charger sends a ripple through the scene. Tilting the laptop nudges the garden, and a quick movement stirs it.

Each of those inputs is optional, and each has the same obligations as the lid: work when it’s available, step aside when it isn’t, and do nothing surprising when a reading is missing.

What I took from it

Reading the lid turned out to be the smallest part of the project. Most of the effort went into everything around it: deciding when to trust the input, how often to ask, what to do when there’s no answer, and how to keep a delightful effect from getting in the way of someone’s day.

If you’re building anything driven by a physical gesture, I’d start there. Decide which devices can take part, treat silence as a normal state, spend effort only when someone is watching, and let people anchor the experience to how they actually use the object. The UnfoldMyMac website shows the effects in motion, and the product page tells the story of how it started.

Sources & further reading

Another question worth following?

Explore the workGet in touch

A good project often starts here.

Leave me
a what if.

All the places to find me ↗
To Satyajit

There’s an app I wish existed.

Tell me who would use it and what they are trying to do. A rough sketch is plenty to start with.

Talk to me on LinkedInLet’s follow the question.