added support of hddtempcmd to GUI

edited readme call
This commit is contained in:
arcan1s
2014-05-22 02:43:54 +04:00
parent 8e318a99d0
commit c0a273f9f7
12 changed files with 149 additions and 85 deletions

View File

@ -87,6 +87,7 @@ class ConfigDefinition:
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")
deConfigFile.write("HDDTEMPCMD=" + str(self.configpage.ui.lineEdit_hddtempCmd.text()) + "\n")
deConfigFile.write("MPDADDRESS=" + str(self.configpage.ui.lineEdit_mpdaddress.text()) + "\n")
deConfigFile.write("MPDPORT=" + str(self.configpage.ui.spinBox_mpdport.value()) + "\n")
item = QStringList()
@ -203,7 +204,8 @@ class ConfigDefinition:
self.configpage.ui.kcolorcombo_up.setColor(QColor(str(settings.get('up_color', '#ff00ff'))))
deSettings = {'CUSTOM':'wget -qO- http://ifconfig.me/ip', 'GPUDEV':'auto', 'HDDDEV':'all',
'MPDADDRESS':'localhost', 'MPDPORT':'6600', 'PKGCMD':'pacman -Qu', 'PKGNULL':'0'}
'HDDTEMPCMD':'sudo hddtemp', 'MPDADDRESS':'localhost', 'MPDPORT':'6600', 'PKGCMD':'pacman -Qu',
'PKGNULL':'0'}
dataengineConfig = unicode(KGlobal.dirs().localkdedir()) + "/share/config/extsysmon.conf"
try:
with open(dataengineConfig, 'r') as deConfigFile:
@ -225,6 +227,7 @@ class ConfigDefinition:
pass
index = self.configpage.ui.comboBox_hdddev.findText(deSettings['HDDDEV'])
self.configpage.ui.comboBox_hdddev.setCurrentIndex(index)
self.configpage.ui.lineEdit_hddtempCmd.setText(deSettings['HDDTEMPCMD'])
self.configpage.ui.lineEdit_mpdaddress.setText(deSettings['MPDADDRESS'])
self.configpage.ui.spinBox_mpdport.setValue(int(deSettings['MPDPORT']))
self.configpage.ui.spinBox_mpdport.setValue(int(deSettings['MPDPORT']))

View File

@ -133,13 +133,17 @@ class pyTextWidget(plasmascript.Applet):
dirPath = kdehome + "/share/pytextmonitor/"
else:
return
locale = QLocale.system().name().split('_')[0]
locale = str(QLocale.system().name())
if (os.path.exists(dirPath + locale + ".md")):
filePath = dirPath + locale + ".md"
elif (os.path.exists(dirPath + "en.md")):
filePath = dirPath + "en.md"
else:
return
locale = locale.split('_')[0]
if (os.path.exists(dirPath + locale + ".md")):
filePath = dirPath + locale + ".md"
elif (os.path.exists(dirPath + "en.md")):
filePath = dirPath + "en.md"
else:
return
os.system("kioclient exec " + str(filePath) + " &")