ApplesauceOS
Read Markdown ↗Download .md

setKeepAwake

Change the persisted keep-screen-awake preference.

js
setKeepAwake(on)

Arguments

ArgumentTypeMeaning
onbooleanEnable with true; disable with false.

Returns

No return value (undefined).

Example

js
setKeepAwake(false);

Notes

Restore the user’s previous setting after a temporary change.

All JavaScript APIs · Automation playbook