From c9fd746cd0efa8e00df2408be5d2ef489048880c Mon Sep 17 00:00:00 2001 From: arcan1s Date: Mon, 7 Apr 2014 03:53:31 +0400 Subject: [PATCH] fix f*cking formats again --- PKGBUILD | 4 ++-- sources/ptm/contents/code/main.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 5f220d2..d419e31 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ pkgname=kdeplasma-applets-pytextmonitor _pkgname=pytextmonitor pkgver=1.7.4 -pkgrel=1 +pkgrel=2 pkgdesc="Minimalistic Plasmoid script written on Python2. It looks like widgets in Awesome WM" arch=('i686' 'x86_64') url="http://arcanis.name/projects/pytextmonitor" @@ -20,7 +20,7 @@ optdepends=("amarok: for music player monitor" makedepends=('automoc4' 'cmake') source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) install=${pkgname}.install -md5sums=('a820a3f9d676e1b05c13839d36df4a9d') +md5sums=('b7ab42465a3c1f12719883d754e86a51') backup=('usr/share/config/extsysmon.conf') prepare() { diff --git a/sources/ptm/contents/code/main.py b/sources/ptm/contents/code/main.py index eee601b..db853aa 100644 --- a/sources/ptm/contents/code/main.py +++ b/sources/ptm/contents/code/main.py @@ -348,7 +348,9 @@ class pyTextWidget(plasmascript.Applet): devices.reverse() for i in devices: if (line.split('$hdd' + str(i))[0] != line): - line = line.split('$hdd' + str(i))[0] + str(self.ptm['values']['hdd'][devices[i]]) + line.split('$hdd' + str(i))[1] + line = line.split('$hdd' + str(i))[0] +\ + str(self.ptm['values']['hdd'][self.ptm['names']['hdd'][i]]) +\ + line.split('$hdd' + str(i))[1] text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] self.setText("hdd", text) @@ -360,7 +362,9 @@ class pyTextWidget(plasmascript.Applet): devices.reverse() for i in devices: if (line.split('$hddtemp' + str(i))[0] != line): - line = line.split('$hddtemp' + str(i))[0] + self.ptm['values']['hddtemp'][devices[i]] + line.split('$hddtemp' + str(i))[1] + line = line.split('$hddtemp' + str(i))[0] +\ + str(self.ptm['values']['hddtemp'][self.ptm['names']['hddtemp'][i]]) +\ + line.split('$hddtemp' + str(i))[1] text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] self.setText("hddtemp", text) @@ -427,7 +431,9 @@ class pyTextWidget(plasmascript.Applet): devices.reverse() for i in devices: if (line.split('$temp' + str(i))[0] != line): - line = line.split('$temp' + str(i))[0] + self.ptm['values']['temp'][devices[i]] + line.split('$temp' + str(i))[1] + line = line.split('$temp' + str(i))[0] +\ + str(self.ptm['values']['temp'][self.ptm['names']['temp'][i]]) +\ + line.split('$temp' + str(i))[1] text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1] self.setText("temp", text)