[modules/battery] Use theme.exclude to not show suffix

If battery module should be "undecorated", do not show the suffix.

fixes #401
This commit is contained in:
Tobias Witek 2019-06-27 20:22:40 +02:00
parent 53462d1f0b
commit 5f3530d258

View file

@ -48,6 +48,8 @@ class Module(bumblebee.engine.Module):
self.capacity(widget)
while len(widgets) > 0: del widgets[0]
for widget in new_widgets:
if bumblebee.util.asbool(self.parameter("decorate", True)) == False:
widget.set("theme.exclude", "suffix")
widgets.append(widget)
self._widgets = widgets
@ -103,9 +105,6 @@ class Module(bumblebee.engine.Module):
elif capacity < int(self.parameter("warning", 20)):
state.append("warning")
if bumblebee.util.asbool(self.parameter("decorate", True)) == False:
return state
if widget.get("ac"):
state.append("AC")
else: