logoalt Hacker News

rancar2yesterday at 9:38 PM2 repliesview on HN

For MacOS, keep awake with:

sudo pmset -a disablesleep 1

Reset back:

sudo pmset -a disablesleep 0


Replies

kageroumadoyesterday at 9:46 PM

This is exactly what the app does, except it ties it to agent activity and re-enables sleep once the turn ends, the laptop is close to overheating, the battery is low, or on a timer.

show 1 reply
hamza_q_today at 12:36 AM

This works great. Only downside is display doesn't turn off when you close the lid. Made a little status bar utility to wrap the disablesleep command and address that downside:

https://github.com/narcotic-sh/modafinil

(yes, I know, another *afinil named Mac sleep prevention app? but hey, I was first :P)

show 1 reply