From eabf167c1f430364289ac315ec5d468870d9d9dd Mon Sep 17 00:00:00 2001 From: Sam Tebbs Date: Wed, 22 Jun 2022 09:12:10 +0100 Subject: [PATCH] Hide battery module if there are no batteries --- bumblebee_status/modules/contrib/battery.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bumblebee_status/modules/contrib/battery.py b/bumblebee_status/modules/contrib/battery.py index 2db2031..6182f20 100644 --- a/bumblebee_status/modules/contrib/battery.py +++ b/bumblebee_status/modules/contrib/battery.py @@ -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"