Commit 222b4074 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

[Battery Monitor] Don't blink when battery is critical

Especially when you're almost out of juice you don't want to be wasting it blinking an icon causing excess repaints.
Also considering the critical percentage is hardcoded to 5% here and doesn't follow PowerDevil's setting.
Given battery critical notification is persistent and always on top of everything these days,
you can't really miss the fact that you're almost ouf of power.

Differential Revision: https://phabricator.kde.org/D26434
parent 08f02266
......@@ -40,12 +40,9 @@ Item {
return PlasmaCore.Types.ActiveStatus
}
if (pmSource.data.Battery["Has Cumulative"]) {
if (pmSource.data.Battery.State !== "Charging" && pmSource.data.Battery.Percent <= 5) {
return PlasmaCore.Types.NeedsAttentionStatus
} else if (pmSource.data["Battery"]["State"] !== "FullyCharged") {
return PlasmaCore.Types.ActiveStatus
}
if (pmSource.data.Battery["Has Cumulative"]
&& pmSource.data["Battery"]["State"] !== "FullyCharged") {
return PlasmaCore.Types.ActiveStatus
}
return PlasmaCore.Types.PassiveStatus
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment