Caffeine-like utility to keep you MacBook awake with its lid closed
clash
13 points
25 comments
October 23, 2026
Related Discussions
Found 5 related stories in 277.8ms across 10,409 title embeddings via pgvector HNSW
- Show HN: Kinesis – Control your Mac with the Meta Neural Band callbacked · 112 pts · September 14, 2026 · 46% similar
- Show HN: Saggar, a Mac terminal that keeps sessions and your attention organized mcclowes · 40 pts · August 17, 2026 · 44% similar
- A privacy-first macOS meeting-notes and writing app that runs on-device westerosweb · 19 pts · July 22, 2026 · 42% similar
- Show HN: macOS menu-bar manager for SSH port forwards linxy97 · 40 pts · July 23, 2026 · 42% similar
- Show HN: SpinWin – A macOS menu bar app to visually rotate or spin any window dbm5 · 35 pts · July 25, 2026 · 42% similar
Discussion Highlights (8 comments)
clash
I wrote a small caffeine-like macOS command-line utility to keep your MacBook awake when you close the lid. This can be handy when you have a long running task active but need to close your MacBook – for example to change trains, head home from a café or commute to the office.
WarOnPrivacy
Windows has been surprisingly good about this (lid closed, laptop awake). I have a number of always-closed laptops deployed for customers (+ mother in law). Some are desktops that can be easily moved; others are on-prem devices that are left alone to handle certain tasks. This isn't my first reading about the struggles MacBook users have here. It is bizarre to me that Apple doesn't natively and reliably support closed+awake devices; it feels like they've dug in their heels and I can't imagine why.
olyjohn
This is neat. I ended up having to buy one of those dummy HDMI dongles to keep my MacBook awake so that I could remote into it. If it thinks there's an external monitor attached, it won't sleep. Or at least you can set it up that way.
nomel
There are probably 20 of these at this point. I use amphetamine [1] (free on the app store). It has configurable timeouts with optional warnings/notifications, to reduce the ability for your MacBook to melt in your backpack. Can also have it disable when an app closes/download completes/battery percentage, and all sorts of triggers (like bluetooth presence, useful for backpack proximity). [1] https://apps.apple.com/us/app/amphetamine/id937984704
pseudosaid
amphetamine has been around forever.
tristanj
Why download a third-party script when this feature is built into MacOS? Just run: sudo pmset -a disablesleep 1 to prevent macOS from sleeping. This works even when you close the lid and are on battery power. To re-enable normal sleep again, change the 1 to a 0.
sys_64738
brew install vorssaint Thank me later.
dlivingston
Just read through the source code. Very simple and the first non-AI coded project I've seen here in a while. Nice work.