Prevent display sleep by default
`caffeinate -i` blocks system idle sleep but lets the display blank, so the screen still slept and the extension looked broken. The "Also Prevent Display Sleep" preference that fixes this defaulted to off. Flip it to on, and guard it with a manifest test that reads package.json and asserts the shipped defaults map to `-i -d`. Verified on macOS: `caffeinate -i` yields PreventUserIdleDisplaySleep 0, `caffeinate -i -d` yields 1.
This commit is contained in:
@@ -23,7 +23,7 @@ Sleep prevention is an OS-level assertion, so the extension delegates to the pla
|
||||
|
||||
| Platform | Mechanism |
|
||||
| --- | --- |
|
||||
| macOS | `/usr/bin/caffeinate -i [-d] [-s]` |
|
||||
| macOS | `/usr/bin/caffeinate -i [-d] [-s]` (defaults to `-i -d`) |
|
||||
| Linux | `systemd-inhibit --what=idle:sleep --why=<reason> sleep infinity` |
|
||||
|
||||
Both run until signalled — there is no timer, so nothing needs to be refreshed or babysat.
|
||||
@@ -63,7 +63,7 @@ pkill -f vicinae-caffeinate
|
||||
|
||||
| Preference | Default | Notes |
|
||||
| --- | --- | --- |
|
||||
| Also Prevent Display Sleep | off | macOS only. `systemd-inhibit` cannot hold the display awake — that is the compositor's job, and the UI says so rather than pretending. |
|
||||
| Prevent Display Sleep | **on** | macOS only. On by default: `caffeinate -i` alone blocks *system* idle sleep, so the screen still blanks and the extension looks broken. Turn it off to save battery. `systemd-inhibit` cannot hold the display awake — that is the compositor's job, and the UI says so rather than pretending. |
|
||||
| Also Prevent System Sleep | off | On macOS this assertion only takes effect while on AC power. |
|
||||
|
||||
## Development
|
||||
|
||||
Reference in New Issue
Block a user