An idle screen costs a screen on wall power and the rest of your afternoon on battery, so they should not be the same number. hypridle has no concept of a power source -- one config, one set of timeouts -- so rather than maintaining two configs and swapping them, panama-idle builds the single config from whichever key set applies, and IdleLock rebuilds it when the charger comes or goes. That runs through the same 400ms debounce a settings change uses, so a loose charger cannot restart hypridle in a loop. The battery keys fall back to their AC counterparts rather than to the schema defaults. Without that, unplugging would silently override a deliberately long timing with a shipped short one, which is the kind of thing you would notice only by losing work. A machine with no battery reads none of it and generates exactly what it generated before. The contract pins that alongside the two obvious directions, and was checked by sabotaging the detection to confirm it fails rather than passing vacuously.
11 lines
567 B
Bash
Executable File
11 lines
567 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Generated by scripts/panama-settings-commands -- do not edit by hand.
|
|
# @vicinae.schemaVersion 1
|
|
# @vicinae.title Settings: Power & Lock
|
|
# @vicinae.mode silent
|
|
# @vicinae.icon ../../icons/hicolor/scalable/apps/panama-settings.svg
|
|
# @vicinae.description Open Power & Lock in Settings.
|
|
# @vicinae.keywords ["settings", "warn at", "urgent at", "stop charging at", "turn the screen off after", "lock the screen after", "suspend after", "lock before sleeping", "lock after"]
|
|
|
|
exec "$HOME/.config/quickshell/scripts/panama-action" settings-page power
|