Hide battery module if there are no batteries

This commit is contained in:
Sam Tebbs 2022-06-22 09:12:10 +01:00
parent df9890690a
commit eabf167c1f

View file

@ -134,6 +134,9 @@ class Module(core.module.Module):
if util.format.asbool(self.parameter("decorate", True)) == False: if util.format.asbool(self.parameter("decorate", True)) == False:
widget.set("theme.exclude", "suffix") widget.set("theme.exclude", "suffix")
def hidden(self):
return len(self._batteries) == 0
def ac(self, widget): def ac(self, widget):
return "ac" return "ac"