integralpro / nosleep

The MacOS X kernel extension, preventing sleep when you close the lid.
GNU General Public License v2.0
874 stars 45 forks source link

pmset disablesleep #48

Open ghost opened 4 years ago

ghost commented 4 years ago

My need is to disable sleep when the lid closed without power, and this command simply works.

sudo pmset -b disablesleep 1

# To restore
sudo pmset -b disablesleep 0

-b means set the parameter for battery mode. There is also -a|-c|-u.

disablesleep is undocumented in man pmset. Does someone know about it?

Source