Merge pull request #108 from Argish42/batteryfull

Battery Module - No text when 100%
This commit is contained in:
enkore 2014-08-28 16:38:20 +02:00
commit fb14041381

View File

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