[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:
parent
53462d1f0b
commit
5f3530d258
1 changed files with 2 additions and 3 deletions
|
@ -48,6 +48,8 @@ class Module(bumblebee.engine.Module):
|
||||||
self.capacity(widget)
|
self.capacity(widget)
|
||||||
while len(widgets) > 0: del widgets[0]
|
while len(widgets) > 0: del widgets[0]
|
||||||
for widget in new_widgets:
|
for widget in new_widgets:
|
||||||
|
if bumblebee.util.asbool(self.parameter("decorate", True)) == False:
|
||||||
|
widget.set("theme.exclude", "suffix")
|
||||||
widgets.append(widget)
|
widgets.append(widget)
|
||||||
self._widgets = widgets
|
self._widgets = widgets
|
||||||
|
|
||||||
|
@ -103,9 +105,6 @@ class Module(bumblebee.engine.Module):
|
||||||
elif capacity < int(self.parameter("warning", 20)):
|
elif capacity < int(self.parameter("warning", 20)):
|
||||||
state.append("warning")
|
state.append("warning")
|
||||||
|
|
||||||
if bumblebee.util.asbool(self.parameter("decorate", True)) == False:
|
|
||||||
return state
|
|
||||||
|
|
||||||
if widget.get("ac"):
|
if widget.get("ac"):
|
||||||
state.append("AC")
|
state.append("AC")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue