mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 23:47:20 +00:00
prepare to release 1.9.0
+ added support of several custom commands * fix parsing pkg label
This commit is contained in:
parent
90ca8c89f5
commit
2de09cec32
@ -1,7 +1,8 @@
|
||||
Ver.1.9.0:
|
||||
+ added support of several custom commands
|
||||
+ added hdd speed label
|
||||
+ added support of several custom commands ($customN)
|
||||
+ added hdd speed label ($hddrN, $hddwN)
|
||||
+ added actions to context menu (open readme and run ksysguard)
|
||||
* fix parsing pkg label
|
||||
- removed doubleclick event
|
||||
|
||||
Ver.1.8.3:
|
||||
|
@ -1,7 +1,8 @@
|
||||
Вер.1.9.0:
|
||||
+ добавлена поддержка нескольких кастомных команд
|
||||
+ добавлено поле скорости hdd
|
||||
+ добавлена поддержка нескольких кастомных команд ($customN)
|
||||
+ добавлено поле скорости hdd ($hddrN, $hddwN)
|
||||
+ добавлены действия в контекстное меню (открыть readme и запустить ksysguard)
|
||||
* исправлен парсинг поля pkg
|
||||
- убрано событие по двойному клику
|
||||
|
||||
Вер.1.8.3:
|
||||
|
2
PKGBUILD
2
PKGBUILD
@ -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=('9cd2ebf4f2afa80c2bd1330c06c86d17')
|
||||
md5sums=('3b65c259a8042b8555ff689a68dfe247')
|
||||
backup=('usr/share/config/extsysmon.conf')
|
||||
|
||||
prepare() {
|
||||
|
@ -80,10 +80,10 @@ class ConfigDefinition:
|
||||
|
||||
dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf"
|
||||
try:
|
||||
item = QStringList()
|
||||
for i in range(self.configpage.ui.listWidget_customCommand.count()):
|
||||
item.append(self.configpage.ui.listWidget_customCommand.item(i).text())
|
||||
with open(dataengineConfig, 'w') as deConfigFile:
|
||||
item = QStringList()
|
||||
for i in range(self.configpage.ui.listWidget_customCommand.count()):
|
||||
item.append(self.configpage.ui.listWidget_customCommand.item(i).text())
|
||||
deConfigFile.write("CUSTOM=" + str(item.join(QString('@@'))) + "\n")
|
||||
deConfigFile.write("GPUDEV=" + str(self.configpage.ui.comboBox_gpudev.currentText()) + "\n")
|
||||
deConfigFile.write("HDDDEV=" + str(self.configpage.ui.comboBox_hdddev.currentText()) + "\n")
|
||||
|
@ -118,8 +118,9 @@ class DataEngine:
|
||||
updatedData['value'] = value
|
||||
elif (sourceName == "custom"):
|
||||
updatedData['name'] = "custom"
|
||||
value = str(data[QString(u'custom')].toUtf8()).decode("utf-8")
|
||||
updatedData['value'] = value
|
||||
updatedData['value'] = {}
|
||||
for singleData in data.keys():
|
||||
updatedData['value'][str(singleData.toLower())] = str(data[singleData].toUtf8()).decode("utf-8")
|
||||
elif ((sourceName[:4] == "disk") and (sourceName[-4:] == "rblk")):
|
||||
updatedData['name'] = "disk-r"
|
||||
updatedData['type'] = '/'.join(str(sourceName).split('/')[0:2])
|
||||
|
@ -623,8 +623,13 @@ class pyTextWidget(plasmascript.Applet):
|
||||
"""function to prepare text"""
|
||||
line = self.ptm['vars']['formats'][name]
|
||||
if (name == "custom"):
|
||||
if (line.split('$custom')[0] != line):
|
||||
line = line.split('$custom')[0] + text + line.split('$custom')[1]
|
||||
cmds = range(len(text.keys()))
|
||||
cmds.reverse()
|
||||
for i in cmds:
|
||||
if (line.split('$custom' + str(i))[0] != line):
|
||||
line = line.split('$custom' + str(i))[0] + \
|
||||
text['custom'+str(i)] + \
|
||||
line.split('$custom' + str(i))[1]
|
||||
elif (name == "gpu"):
|
||||
if (line.split('$gpu')[0] != line):
|
||||
line = line.split('$gpu')[0] + text + line.split('$gpu')[1]
|
||||
@ -632,9 +637,13 @@ class pyTextWidget(plasmascript.Applet):
|
||||
if (line.split('$gputemp')[0] != line):
|
||||
line = line.split('$gputemp')[0] + getTemp(text, self.ptm['vars']['adv']['tempUnits']) + line.split('$gputemp')[1]
|
||||
elif (name == "pkg"):
|
||||
for item in text.keys():
|
||||
if (line.split('$' + item)[0] != line):
|
||||
line = line.split('$' + item)[0] + text[item] + line.split('$' + item)[1]
|
||||
pkgs = range(len(text.keys()))
|
||||
pkgs.reverse()
|
||||
for i in pkgs:
|
||||
if (line.split('$pkgcount' + str(i))[0] != line):
|
||||
line = line.split('$pkgcount' + str(i))[0] + \
|
||||
text['pkgcount'+str(i)] + \
|
||||
line.split('$pkgcount' + str(i))[1]
|
||||
elif (name == "player"):
|
||||
if (line.split('$album')[0] != line):
|
||||
line = line.split('$album')[0] + text['album'] + line.split('$album')[1]
|
||||
|
Loading…
Reference in New Issue
Block a user