# setKeepAwake

Change the persisted keep-screen-awake preference.

```js
setKeepAwake(on)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `on` | boolean | Enable 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](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
