Show HN: Afterlid, guarded lid closed work for macOS

rjsajnani1 pts0 comments

I built Afterlid because I kept having the same awkward choice: interrupt a build, download, render, remote session, or local AI run, or leave my MacBook open when I needed to move.It is a native menu bar app with three explicit power states. Sleepy follows normal macOS sleep. Awake uses standard power assertions while the lid is open. Always On is the lid closed mode. It temporarily changes the system sleep setting through a small privileged helper, then restores it when the session ends.The part I cared about most was failure behaviour. An Always On session stops after eight hours, at 30 percent battery when unplugged, under serious or critical thermal pressure, or when the app heartbeat disappears. The Mac remains the final authority.This is not an agent runner or a cloud execution service. Work, prompts, files, and credentials stay on the Mac. It is also not just a nicer caffeinate command. The extra work is around lid close behaviour, visible state, bounded sessions, and recovery when something goes wrong.The lid closed path currently relies on an undocumented macOS sleep setting, so I am treating hardware testing and honest boundaries as part of the product, not a footnote.I would appreciate technical feedback, especially on recovery cases I may have missed and whether the three mode model is clear. I built it and will answer questions directly.

closed work macos session sleep afterlid

Related Articles