From 2052f58dde1347cea549e08cd3d9e15137a604d1 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Wed, 19 Apr 2017 18:53:45 +0200 Subject: [PATCH] [modules/sensors] Minor cosmetic changes + screenshot Cosmetic changes: * replace all single ticks with double ticks * add vim line Added screenshot for sensors module. --- bumblebee/modules/sensors.py | 8 +++++--- screenshots/sensors.png | Bin 0 -> 1330 bytes 2 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 screenshots/sensors.png 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 0000000000000000000000000000000000000000..2ecc9bf94a8d8271bb5c736c4adff0d1ff059c90 GIT binary patch literal 1330 zcmV-21NB8S*4C62f|3?gJHPotTq(h&x&;f6exB<^b67Eg#f6l zD3b^US+R~P1H~Hzck<~^h*n=!sj66#m*R-D94Z!xl6LECG`!widHBg+j>Ye9KTNa@ z8rkJ0qgcq_@cR2ltdEx0Q<+-GW8b*cpezzUUi0(~SbRt@LyAm0VB+7GGo1hc3J@2b z*h#09m&;{|wm%RQa5)4ce)v{vRe1@I&3wGRMLhSK$N$jk9G;vTo}9DTU3EtFpk?~0 z7XbjMWzrA2ntr@D(LZ91$K&r`X`FSfA|aGy6H(w#Zgea>+4!!1RLJMN(NblZa^dm# zsVP$ExfU&Vg6QN`6&C196e)fUE}OB3?tgu2s9ae<+8GUF+ek2RDGKvY6q{afC#a=W z&u6`NXBOQ%fzZ&z+>Fa@(!WMJV69GtMPj!{rvjnyz?hxKV%8c|nNY+iW!nrqGm&vA zmgH5JsnZDr5RS(aNGpOgRcgkk7i0LrTR4tyZX?gw-5|=KksE{R3Wde)O0=)Hn;-}n z)Ww-l1dubGHT-)-zE2{^t*a>e52A08L?Dxj%r@tVEQ6L~ES1kLt&)x-Im7q(5CA~E zL8Flu+#H-J6bmz%rJdY)B86hq$gGc6jyx~O6I`s(_WovuAV8;4=`<>f@j^W6sMmk` z@zp#5_l0OW)HakIGE&FIUExhjE)6$^ZZW07*qoM6N<$f;z}>T>t<8 literal 0 HcmV?d00001