diff --git a/bumblebee/modules/sensors.py b/bumblebee/modules/sensors.py index ffee663..f38bb78 100644 --- a/bumblebee/modules/sensors.py +++ b/bumblebee/modules/sensors.py @@ -20,9 +20,9 @@ class Module(bumblebee.engine.Module): super(Module, self).__init__(engine, config, bumblebee.output.Widget(full_text=self.temperature) ) - self._temperature = 'unknown' + self._temperature = "unknown" pattern = self.parameter("match", "temp1_input") - pattern_string = r'^\s*{}:\s*([\d.]+)$'.format(pattern) + pattern_string = r"^\s*{}:\s*([\d.]+)$".format(pattern) self._match_number = int(self.parameter("match_number", "-1")) self._pattern = re.compile(pattern_string, re.MULTILINE) engine.input.register_callback(self, button=bumblebee.input.LEFT_MOUSE, cmd="xsensors") @@ -30,7 +30,7 @@ class Module(bumblebee.engine.Module): def get_temp(self): temperatures = bumblebee.util.execute("sensors -u") matching_temp = self._pattern.findall(temperatures) - temperature = 'unknown' + temperature = "unknown" if matching_temp: temperature = matching_temp[self._match_number] @@ -41,3 +41,5 @@ class Module(bumblebee.engine.Module): def update(self, widgets): self._temperature = self.get_temp() + +# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/screenshots/sensors.png b/screenshots/sensors.png new file mode 100644 index 0000000..2ecc9bf Binary files /dev/null and b/screenshots/sensors.png differ