diff --git a/bumblebee/input.py b/bumblebee/input.py index 710589e..af86757 100644 --- a/bumblebee/input.py +++ b/bumblebee/input.py @@ -53,7 +53,6 @@ def read_input(inp): log.debug("failed to parse event: {}".format(e)) log.debug("exiting click event processing") poll.unregister(sys.stdin.fileno()) - poll.close() inp.has_event = True inp.clean_exit = True diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 4174e56..437a7d2 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -7,6 +7,7 @@ Parameters: * battery.warning : Warning threshold in % of remaining charge (defaults to 20) * battery.critical : Critical threshold in % of remaining charge (defaults to 10) * battery.showdevice : If set to "true", add the device name to the widget (defaults to False) + * battery.decorate : If set to "false", hides additional icons (charging, etc.) (defaults to True) """ import os @@ -102,6 +103,9 @@ 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: