Repository navigation
Conversation
[Medium impact] The PR appears safe to merge; the previously reported lost warning is fixed. SummaryKeeps low-battery warnings visible until dismissed, charging starts, or the battery recovers above 20%.
|
This comment has been minimized.
This comment has been minimized.
|
Thanks @kairosci, agreed these fit together: #20264 changes when the warning fires, this one changes how it's shown. They edit the same lines in One difference to settle before then is re-arming on charge. #20264 deliberately doesn't re-arm when charging starts: a loose cable or AC flap right at a threshold would otherwise warn again on every reconnect. It re-arms only when the level climbs back above a threshold. This PR re-arms after charging stops below 20%. With critical, sticky notifications and a sound, a flickering charger would repeat that alert, so I'd keep re-arming tied to the level recovering. Happy to adapt either PR to whatever the maintainers prefer. @IvanJS17, on your measurements in #20084: the thresholds in #20264 are a list ( |
b2eb81e to
d017e81
Compare
d017e81 to
b8c4c38
Compare
|
your five commits are in #21013. dismiss on charge or after recovery is still there, and the latch is the 20/10 warnedAt value rather than notifiedLowBattery. it is not persisted, so a restart while the pack is still low warns again. @dhh @omarchybot if 21013 lands, this can close as superseded. |
Fixes #20085. Low-battery alerts now use critical urgency and stay visible until dismissed or the battery starts charging or recovers above 20%. If charging stops briefly before recovery, the warning is re-armed and appears again while the battery is still low and discharging.
The shipped warning-sound hook is active by default. Migration 1795704847 installs it for existing users when missing, preserves customized hooks, and waits for the settings package if its default hook has not arrived yet. This complements #20264, which adds 20% and 10% warning thresholds.
bash test/shell.d/battery-test.sh passes, covering warning decisions, dismissal/re-arm behavior, urgency, and the localized dismissal command.
Ran migration 1795704847 against temporary homes: it exits 75 when the settings package is absent, installs the default hook once available, and preserves an existing custom hook.
I did not play the sound on the active desktop; audio output and sound-theme availability are machine-specific.
No layout or styling change: the notification card keeps its existing appearance; this changes its lifetime, recovery behavior, and default warning sound.