From 19e6abc8ca61ba0b0ad7ea92001fe32c566b1f2a Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 1 Nov 2018 22:15:00 +0100 Subject: [PATCH] Added option to disable city display --- bumblebee/modules/weather.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bumblebee/modules/weather.py b/bumblebee/modules/weather.py index 00c5873..eaf81a1 100644 --- a/bumblebee/modules/weather.py +++ b/bumblebee/modules/weather.py @@ -33,6 +33,7 @@ class Module(bumblebee.engine.Module): self._location = self.parameter("location", "auto") self._city = self.parameter("location", "") self._unit = self.parameter("unit", "metric") + self._showcity = self.parameter("showcity", "true") 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 == "false": + return self.temperature() + else: + return self.city() + self.temperature() def state(self, widget): if self._valid: