eww: Fixed bar's battery widget being critical when battery charges

TODO: Make closure prettier
This commit is contained in:
GaspardCulis 2024-01-28 14:43:06 +01:00
parent ff88da4872
commit d8a00d24dc

View file

@ -122,7 +122,7 @@
" ${EWW_BATTERY.BAT0.capacity}% (${round(energy_now/power_now, 0)}h${round((energy_now/power_now - round(energy_now/power_now - 0.5, 0)) * 60, 0)} at ${round(power_now/1000000, 2)}W)" :
" ${EWW_BATTERY.BAT0.capacity}%"
}"
:class "${EWW_BATTERY.BAT0.capacity <= 15 || power_now/1000000 > 25 ? "critical" : EWW_BATTERY.BAT0.capacity <= 40 || power_now/1000000 > 15 ? "warning" : "normal"}")
:class "${EWW_BATTERY.BAT0.status == "Discharging" ? EWW_BATTERY.BAT0.capacity <= 15 || power_now/1000000 > 25 ? "critical" : EWW_BATTERY.BAT0.capacity <= 40 || power_now/1000000 > 15 ? "warning" : "normal" : "normal"}")
)
(defwidget volume []