Merge pull request #892 from SamTebbs33/main

Hide battery module if there are no batteries
This commit is contained in:
tobi-wan-kenobi 2022-06-22 11:29:58 +02:00 committed by GitHub
commit f462102439
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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