battery: Use alert_percentage for coloring the entry red

This commit is contained in:
enkore 2013-10-24 15:36:51 +02:00
parent ff32f74bec
commit 98ba2e69da

View File

@ -145,12 +145,12 @@ class BatteryChecker(IntervalModule):
}
status = battery.status()
if status in ["Discharging", "Charging"]:
if status in ["Charging", "Discharging"]:
remaining = battery.remaining()
fdict["remaining"] = TimeWrapper(remaining * 60, "%E%h:%M")
if status == "Discharging":
fdict["status"] = "DIS"
if remaining < 15:
if battery.percentage() <= self.alert_percentage:
urgent = True
color = "#ff0000"
else: