diff --git a/bumblebee/modules/battery.py b/bumblebee/modules/battery.py index 5367d5f..bd10efe 100644 --- a/bumblebee/modules/battery.py +++ b/bumblebee/modules/battery.py @@ -112,6 +112,8 @@ class Module(bumblebee.engine.Module): pass if charge == "Discharging": state.append("discharging-{}".format(min([10, 25, 50, 80, 100], key=lambda i: abs(i-capacity)))) + elif charge == "Unknown": + state.append("unknown") else: if capacity > 95: state.append("charged") diff --git a/bumblebee/modules/datetime.py b/bumblebee/modules/datetime.py index 14c2d67..02f71b9 100644 --- a/bumblebee/modules/datetime.py +++ b/bumblebee/modules/datetime.py @@ -30,6 +30,8 @@ class Module(bumblebee.engine.Module): def __init__(self, engine, config): super(Module, self).__init__(engine, config, bumblebee.output.Widget(full_text=self.get_time)) + engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, + cmd=self._app) self._fmt = self.parameter("format", default_format(self.name)) l = locale.getdefaultlocale() if not l or l == (None, None): diff --git a/bumblebee/modules/weather.py b/bumblebee/modules/weather.py index 00c5873..8676fc0 100644 --- a/bumblebee/modules/weather.py +++ b/bumblebee/modules/weather.py @@ -32,6 +32,7 @@ class Module(bumblebee.engine.Module): self._apikey = self.parameter("apikey", "af7bfe22287c652d032a3064ffa44088") self._location = self.parameter("location", "auto") self._city = self.parameter("location", "") + self._showcity = bumblebee.util.asbool(self.parameter("showcity", True)) self._unit = self.parameter("unit", "metric") self._valid = False self.interval(15) @@ -55,7 +56,10 @@ class Module(bumblebee.engine.Module): def output(self, widget): if not self._valid: return u"?" - return self.city() + self.temperature() + if self._showcity: + return self.city() + self.temperature() + else: + return self.temperature() def state(self, widget): if self._valid: