Merge pull request #892 from SamTebbs33/main
Hide battery module if there are no batteries
This commit is contained in:
commit
f462102439
1 changed files with 3 additions and 0 deletions
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue