frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Caffeine-like utility to keep you MacBook awake with its lid closed

https://github.com/clashman/caffeinate-plus
10•clash•5h ago

Comments

clash•5h ago
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•5h ago
> I wrote a small caffeine-like macOS command-line utility to keep your MacBook awake when you close the lid.

Small purposeful utilities like this are Glob's own gift to us. Your counterpart in my Windows world might be the guy who wrote AlwaysActiveHours - a util that prevents update-related reboots.

clash•5h ago
Haha, every operating system has its quirks. The auto reboot is certainly a very nasty one.
WarOnPrivacy•5h ago
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.

el_benhameen•1h ago
Windows is so good at this that it refuses to let my work laptop sleep when I close it and put it in my backpack no matter how many settings I try tweaking.
cosmic_cheese•58m ago
For the desk setup scenario, it's less of a problem since they'll stay awake in clamshell if they've got a power source and are hooked up to an external monitor. I've used my personal MacBook in a hybrid home/work setup like this for years without issue. It's only if you want clamshell on battery and/or with no external monitor that tools like this become necessary.
olyjohn•2h ago
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•2h ago
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

mathfailure•1h ago
Are those 20 free and open source as well? Name them then.
nomel•58m ago
My mistake. Well over 20.

https://www.google.com/search?q=site%3Agithub.com+keep+mac+o...

First one I used was around 9 years ago. Nearly melted my backpack with the hot Intel CPU!

If you don't want to install anything, you can disable sleep with the built in tools: sudo pmset -a disablesleep 1

randomblock1•54m ago
I mean, yeah...

https://github.com/search?q=caffeinate+lid+close&type=reposi...

semiquaver•46m ago
pseudosaid•2h ago
amphetamine has been around forever.
tristanj•58m ago
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•30m ago
brew install vorssaint

Thank me later.

What are you talking about? It’s a one line terminal invocation. These apps are utterly useless. Of course there’s a million open source ones.

Kimi K3.1 Pro and K3.1 Pro Highspeed

https://www.kimi.ai/blog/kimi-k3-1-pro
675•Jowsey•7h ago•432 comments

Apple Music 404 Not Found

https://music.apple.com/this-url-doesnt-exist
533•frizlab•11h ago•180 comments

CVE Tracker

https://cve.0xosprey.com/
81•Group_B•3h ago•22 comments

Evolving Threat: http2shell is an RCE in node, Python, and more

https://nitter.click/AikidoSecurity/status/2113759110625906950?__galadriel=lPmlGl9id4oAd5UeBwMhlY...
20•cowlevel•58m ago•4 comments

Today, we hacked what we'd set out to hack: the iPhone

https://blog.calif.io/p/iphone
724•pavel_lishin•8h ago•469 comments

Dessa: the most authentic full-duplex speech model ever built

https://block.xyz/dessa
194•dsr12•5h ago•87 comments

Local Wikipedia: Wikipedia, but only for things a half hour walk from you

https://edjefferson.com/localwiki/
1212•sohkamyung•1d ago•223 comments

The Real Kevin Bacon

https://pudding.cool/2026/10/kevin-bacon/
226•xnx•3d ago•66 comments

Canadians are running out of time to oppose Bill C-22

https://www.eff.org/deeplinks/2026/10/canadians-are-running-out-time-oppose-dangerous-c-22-survei...
303•hn_acker•1d ago•157 comments

Show HN: Corgi, a helpful {agent, terminal} multiplexer

https://corgi.computer/
20•eiopa•4h ago•2 comments

Now Google says it might use your Gmail and Google Photos data to target ads

https://www.theverge.com/tech/1017600/google-personal-intelligence-privacy-policy-ads-update
243•JustSkyfall•4h ago•125 comments

No Source Code? No Problem

https://queue.acm.org/doi/10.1145/945131.945155
28•ibobev•3h ago•19 comments

Rune 1.3: adds TypeScript, a Helix editor, Kitty graphics and OSC-7501

https://rune.build/blog/rune-1-3-release
32•ernestrc•4h ago•7 comments

A whirlwind tour of systemd-nspawn containers

https://quantum5.ca/2025/03/22/whirlwind-tour-of-systemd-nspawn-containers/
26•ibobev•3h ago•6 comments

Air Purifiers as White Noise Machines

https://www.jefftk.com/p/air-purifiers-as-white-noise-machines
54•luu•6h ago•78 comments

A Bicycle Journey Across Brazil to Find a Vanishing Savanna

https://e360.yale.edu/features/2026-film-contest-second-place-cerrado
20•throwaway2037•2d ago•6 comments

Rise of collagen-eating microbes may help explain gaps in the fossil record

https://www.cam.ac.uk/research/news/rise-of-collagen-eating-microbes-may-help-explain-gaps-in-the...
5•gmays•3d ago•0 comments

Securing our frontier model training environment

https://openai.com/index/securing-our-frontier-model-training-environment/
66•pretext•4h ago•78 comments

DNS: A Replacement for Finger

https://altchan.org/sh/42
20•Bender•5h ago•17 comments

Animations for System Builders

https://brooker.co.za/blog/2026/10/23/animations.html
31•KraftyOne•7h ago•3 comments

Show HN: Impossible Machines: declaratively program the physical world

https://www.impossiblemachines.xyz
57•bhaprayan•1d ago•17 comments

Show HN: Swurf – Swipe through the real web

https://swurf.org/
58•webtjb096•17h ago•28 comments

Reforming English Spelling

https://blog.oup.com/2026/10/reforming-english-spelling/
18•jruohonen•8h ago•74 comments

UUIDv7 doesn't have the properties you think it does

https://alexsci.com/blog/uuidv7-is-weird/
103•ibobev•7h ago•89 comments

German court calls Google aerial imagery 'spying'

https://www.courthousenews.com/german-court-calls-google-aerial-imagery-spying/
21•rdmuser•2h ago•7 comments

LISP Comes of Age (1980)

https://microship.com/lisp-comes-of-age/
57•so-cal-schemer•1d ago•17 comments

The Missed Opportunities of Sonic 06 (2025)

https://isaacmarovitz.com/posts/sonic-06/
56•ibobev•7h ago•17 comments

We are all living inside of an obscure sci-fi film from 1970

https://thanksforthatjim.bearblog.dev/we-are-all-living-inside-of-an-obscure-sci-fi-film-from-1970/
107•speckx•4h ago•102 comments

I turned my TV into a Game Boy Color with a Pokemon town as my home screen

https://twitter.com/robbietilton/status/2111936458923851923
59•scrambled•6h ago•21 comments

Gemma-4-26B-A4B with 39-69% less thinking at same accuracy

https://bottlecapai.com/post/thinkingcap-gemma-4-26b/
101•armcat•9h ago•19 comments