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:
+3
-3
@@ -26,12 +26,12 @@
|
||||
"preferences": [
|
||||
{
|
||||
"name": "preventDisplaySleep",
|
||||
"title": "Also Prevent Display Sleep",
|
||||
"description": "Keep the screen on as well. Off means the display may still turn off while the system stays awake.",
|
||||
"title": "Prevent Display Sleep",
|
||||
"description": "Keep the screen on. On by default, because a blank screen is the usual reason caffeination looks like it is not working. Turn it off to let the display sleep while the system stays awake (saves battery).",
|
||||
"type": "checkbox",
|
||||
"label": "Prevent display sleep",
|
||||
"required": false,
|
||||
"default": false
|
||||
"default": true
|
||||
},
|
||||
{
|
||||
"name": "preventSystemSleep",
|
||||
|
||||
Reference in New Issue
Block a user