Re:Caffeine-like utility to keep you MacBook awake with its ...
by clash on Saturday October 24, 2026 @07:40AM
(#50220324)
You say "No need to write a tool", then immediately write a tool. Brilliant :)
My first attempt was a shell script almost exactly like yours.
Then I thought I want to be able to set SUID so I don't have to use sudo. This ruled out the shell script. I could have just done a bunch of 'system("pmset ...")' calls but thought I might as well use the native commands.
My first attempt was a shell script almost exactly like yours. Then I thought I want to be able to set SUID so I don't have to use sudo. This ruled out the shell script. I could have just done a bunch of 'system("pmset ...")' calls but thought I might as well use the native commands.