News for hackers. Stuff that matters.
Re:Caffeine-like utility to keep you MacBook awake with its ... by nomel on Friday October 23, 2026 @07:30PM (#50216793)
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

Re:Caffeine-like utility to keep you MacBook awake with its ... by clash on Friday October 23, 2026 @09:37PM (#50217598)
Yeah, most of these repositories contain more files than caffeinate+ has lines of code.

The API call that 'sudo pmset -a disablesleep 1' does is literally the first thing caffeine+ does. But is only part of the full solution: As soon as the lid closes the command is automatically reverted so you can't forget to do it yourself. Also if you kill caffeinate+, the MacBook is put to sleep when the lid is still closed.

Re:Caffeine-like utility to keep you MacBook awake with its ... by nomel on Friday October 23, 2026 @09:51PM (#50217672)
Yes, most of the very many that you didn't know existed just a moment ago also handle that tricky case of restoring normal operation.
Re:Caffeine-like utility to keep you MacBook awake with its ... by clash on Saturday October 24, 2026 @07:46AM (#50220376)
Bold accusation ;)

You forgot to argue about the LOC vs file count issue.

Also, you are wrong: None does auto sleep on script exit.

Re:Caffeine-like utility to keep you MacBook awake with its ... by nomel on Saturday October 24, 2026 @12:27PM (#50222791)
Oops, didn't follow user names. My mistake.

And, I've been using these for around 9 years. A few I tried most definitely did re-enable on exit. Not sure why file count is a concern, or especially LOC (a truly horrendous metric to target, with the outcome being unintelligible code golf when optimized for). All that I used were exactly one file I was concerned with: a binary or shell script.

This has become strange. Cheers!

Re:Caffeine-like utility to keep you MacBook awake with its ... by clash on Sunday October 25, 2026 @08:10AM (#50230743)
Obviously code-golfed LOC is bullshit. 50 files and GUI for a near-trivial functionality is excessive, though.