battery-full

This commit is contained in:
Argish42 2014-08-28 00:43:46 +02:00
parent c91c792a7d
commit de4bc9e70f

View File

@ -131,6 +131,7 @@ class BatteryChecker(IntervalModule):
("charging_color", "The charging color"), ("charging_color", "The charging color"),
("critical_color", "The critical color"), ("critical_color", "The critical color"),
("not_present_color", "The not present color."), ("not_present_color", "The not present color."),
("no_text_full","Don't display text when battery is full - 100%"),
) )
battery_ident = "BAT0" battery_ident = "BAT0"
format = "{status} {remaining}" format = "{status} {remaining}"
@ -150,6 +151,7 @@ class BatteryChecker(IntervalModule):
charging_color = "#00ff00" charging_color = "#00ff00"
critical_color = "#ff0000" critical_color = "#ff0000"
not_present_color = "#ffffff" not_present_color = "#ffffff"
no_text_full = False
path = None path = None
@ -170,12 +172,12 @@ class BatteryChecker(IntervalModule):
"color": self.not_present_color, "color": self.not_present_color,
} }
return return
if self.no_text_full:
if battery.percentage() > 99.9: if battery.percentage() > 99.9:
self.output = { self.output = {
"full_text": "" "full_text": ""
} }
return return
fdict = { fdict = {
"battery_ident": self.battery_ident, "battery_ident": self.battery_ident,