Command reference
ed lid-awake
ed lid-awake controls every part of the Lid Awake extension from the shell.
Running it without a subcommand is the same as ed lid-awake status.
| Command | What it does |
|---|---|
ed lid-awake status |
Show active state, session, remaining time, battery policy and helper state |
ed lid-awake on |
Preview turning Lid Awake on indefinitely |
ed lid-awake on --for 15m --yes |
Turn it on for 15 minutes |
ed lid-awake on --for 30m --yes |
Turn it on for 30 minutes |
ed lid-awake on --for 1h --yes |
Turn it on for one hour |
ed lid-awake on --for 2h --yes |
Turn it on for two hours |
ed lid-awake on --until-lid-reopens --yes |
Stop after the lid closes and opens again |
ed lid-awake off |
Restore normal lid-close sleep |
ed lid-awake battery 20 |
Pause below 20 percent battery |
ed lid-awake battery off |
Disable battery auto-pause |
ed lid-awake restore-on-quit true |
Restore normal sleep when the menu bar app quits |
Confirmed on, off and live status use the running menu bar app. They wait
for the same engine used by the shelf and extension popup, so a successful
command means the system setting was actually applied. on previews without
side effects unless --yes is present, then enables the extension if needed.
The first activation opens System Settings when macOS still needs approval for
Edith's background helper. Turn on the Edith item that affects all users once,
then run the command again. Later changes use that helper without asking for the
administrator password again. Edith does not fall back to a password dialog.
Commands
ed lid-awake statused lid-awake oned lid-awake offed lid-awake batteryed lid-awake restore-on-quit
JSON
Every command accepts --json. status, confirmed on, and off return the
same full state object:
{ "active": true, "appRunning": true, "applying": false, "batterySuspended": false, "batteryThreshold": 20, "extensionEnabled": true, "helperStatus": "enabled", "lastError": null, "remainingSeconds": 1799.5, "requestedActive": true, "restoreOnQuit": true, "session": "thirtyMinutes"}remainingSeconds and lastError are always present in state JSON and are null
when there is no deadline or failure. helperStatus is enabled,
awaitingApproval, notRegistered, notFound or, when the app is closed,
unavailable. battery returns only batteryThreshold, and
restore-on-quit returns only restoreOnQuit after applying. Preview JSON from
on and disabling restore-on-quit always contains operation, performed,
requiresConfirmation, summary, warning, session, and restoreOnQuit.
Persistent values are also available through ed config:
ed config get lidAwakeActiveed config set lidAwakeEnabled trueed config set lidAwakeSession oneHoured config set lidAwakeBatteryThreshold 20ed config set lidAwakeRestoreOnQuit truelidAwakeActive is read only because changing a preference cannot change the
system power state. Use ed lid-awake on and ed lid-awake off for that.
The other four keys are persistent settings, but changing them does not perform
a runtime action. In particular, bare ed lid-awake on previews an indefinite
session. It does not reuse lidAwakeSession; pass --for or
--until-lid-reopens to select a different session, then --yes to start it.
Exit codes
| Code | Meaning |
|---|---|
| 0 | The request completed, or a disruptive action was previewed without applying it |
| 1 | The helper or pmset rejected the change, or a value was invalid |
| 2 | The command syntax was invalid |
| 4 | A confirmed runtime action did not get an answer from Edith |