From 5f3530d2589c3803330b90a9a1e97d0e82a6d1a1 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Thu, 27 Jun 2019 20:22:40 +0200 Subject: [PATCH] [modules/battery] Use theme.exclude to not show suffix If battery module should be "undecorated", do not show the suffix. fixes #401 --- bumblebee/modules/battery.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 437a7d2..b890137 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -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: