mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 07:57:19 +00:00
Added notification for cpu/cpuclock/temp
+ notification carcass
This commit is contained in:
parent
3994652562
commit
d5a91f566e
@ -44,8 +44,8 @@ class ConfigDefinition:
|
|||||||
if (self.parent.cpuBool > 0):
|
if (self.parent.cpuBool > 0):
|
||||||
self.parent.systemmonitor.disconnectSource("cpu/system/TotalLoad", self.parent)
|
self.parent.systemmonitor.disconnectSource("cpu/system/TotalLoad", self.parent)
|
||||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||||
self.parent.label_cpu0.setText('')
|
self.parent.label_cpu.setText('')
|
||||||
self.parent.layout.removeItem(self.parent.label_cpu0)
|
self.parent.layout.removeItem(self.parent.label_cpu)
|
||||||
self.parent.label_cpu1.setText('')
|
self.parent.label_cpu1.setText('')
|
||||||
self.parent.layout.removeItem(self.parent.label_cpu1)
|
self.parent.layout.removeItem(self.parent.label_cpu1)
|
||||||
for core in range(self.parent.numCores):
|
for core in range(self.parent.numCores):
|
||||||
@ -58,8 +58,8 @@ class ConfigDefinition:
|
|||||||
if (self.parent.cpuclockBool > 0):
|
if (self.parent.cpuclockBool > 0):
|
||||||
self.parent.systemmonitor.disconnectSource("cpu/system/AverageClock", self.parent)
|
self.parent.systemmonitor.disconnectSource("cpu/system/AverageClock", self.parent)
|
||||||
if (self.parent.cpuclockFormat.split('$ccpu')[0] != self.parent.cpuclockFormat):
|
if (self.parent.cpuclockFormat.split('$ccpu')[0] != self.parent.cpuclockFormat):
|
||||||
self.parent.label_cpuclock0.setText('')
|
self.parent.label_cpuclock.setText('')
|
||||||
self.parent.layout.removeItem(self.parent.label_cpuclock0)
|
self.parent.layout.removeItem(self.parent.label_cpuclock)
|
||||||
self.parent.label_cpuclock1.setText('')
|
self.parent.label_cpuclock1.setText('')
|
||||||
self.parent.layout.removeItem(self.parent.label_cpuclock1)
|
self.parent.layout.removeItem(self.parent.label_cpuclock1)
|
||||||
for core in range(self.parent.numCores):
|
for core in range(self.parent.numCores):
|
||||||
|
@ -81,7 +81,7 @@ class DataEngine:
|
|||||||
else:
|
else:
|
||||||
line = self.parent.cpuFormat.split('$ccpu')[0]
|
line = self.parent.cpuFormat.split('$ccpu')[0]
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_cpu0.setText(text)
|
self.parent.label_cpu.setText(text)
|
||||||
if (self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[1]):
|
if (self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[1]):
|
||||||
line = self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] + cpuText + self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[1]
|
line = self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[0] + cpuText + self.parent.cpuFormat.split('$ccpu')[1].split('$cpu')[1]
|
||||||
else:
|
else:
|
||||||
@ -109,7 +109,7 @@ class DataEngine:
|
|||||||
else:
|
else:
|
||||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_cpuclock0.setText(text)
|
self.parent.label_cpuclock.setText(text)
|
||||||
if (self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[1]):
|
if (self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[1]):
|
||||||
line = self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] + cpuclockText + self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[1]
|
line = self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[0] + cpuclockText + self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[1]
|
||||||
else:
|
else:
|
||||||
|
@ -27,14 +27,113 @@ class PTMNotify:
|
|||||||
notification.sendEvent();
|
notification.sendEvent();
|
||||||
|
|
||||||
|
|
||||||
def initText(self, sender):
|
def createText(self, type):
|
||||||
"""function to create text"""
|
"""function to create text"""
|
||||||
content = []
|
content = []
|
||||||
if (sender == self.parent.parent.label_uptime):
|
if (type == "system"):
|
||||||
content.append("system")
|
content.append("system")
|
||||||
text = "Kernel: " + commands.getoutput("uname -rsm") + "\n"
|
text = ""
|
||||||
|
try:
|
||||||
|
text = text + "Kernel: " + commands.getoutput("uname -rsm") + "\n"
|
||||||
text = text + "Hostname: " + commands.getoutput("uname -n") + "\n"
|
text = text + "Hostname: " + commands.getoutput("uname -n") + "\n"
|
||||||
text = text + "Whoami: " + commands.getoutput("whoami") + "\n"
|
text = text + "Whoami: " + commands.getoutput("whoami") + "\n"
|
||||||
text = text + "Uptime: " + commands.getoutput("uptime")
|
text = text + "Uptime: " + commands.getoutput("uptime")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
content.append(text)
|
content.append(text)
|
||||||
|
elif (type == "processor"):
|
||||||
|
content.append("processor")
|
||||||
|
text = ""
|
||||||
|
try:
|
||||||
|
output = commands.getoutput("grep 'model name' /proc/cpuinfo | head -1")
|
||||||
|
text = text + "Model: " + ' '.join(output.split()[3:]) + "\n"
|
||||||
|
output = commands.getoutput("sar -u | tail -1")
|
||||||
|
text = text + "CPU Usage: " + str(100-float(output[-1])) + "%\n"
|
||||||
|
output = commands.getoutput("grep MHz /proc/cpuinfo | head -1")
|
||||||
|
text = text + "CPU Freq: " + str(int(float(output.split()[-1]))) + " MHz\n"
|
||||||
|
output = commands.getoutput("sensors -u")
|
||||||
|
text = text + "Temps:"
|
||||||
|
for line in output.split("\n"):
|
||||||
|
if (line.find("_input") > -1):
|
||||||
|
text = text + " " + str(round(float(line.split()[-1]), 0)) + "\xb0C"
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
content.append(text)
|
||||||
|
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
|
||||||
|
def initText(self, sender):
|
||||||
|
"""function to send text"""
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_uptime):
|
||||||
|
content = self.createText("system")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_cpu):
|
||||||
|
content = self.createText("processor")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_cpuclock):
|
||||||
|
content = self.createText("processor")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_temp):
|
||||||
|
content = self.createText("processor")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_gpu):
|
||||||
|
content = self.createText("graphical")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_gputemp):
|
||||||
|
content = self.createText("graphical")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_mem):
|
||||||
|
content = self.createText("memory")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_swap):
|
||||||
|
content = self.createText("memory")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_hdd0):
|
||||||
|
content = self.createText("hdd")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_hddtemp):
|
||||||
|
content = self.createText("hdd")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_netDown):
|
||||||
|
content = self.createText("network")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
if (sender == self.parent.parent.label_bat):
|
||||||
|
content = self.createText("acpi")
|
||||||
|
return content
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
@ -53,15 +53,15 @@ class Reinit():
|
|||||||
if (self.parent.cpuBool > 0):
|
if (self.parent.cpuBool > 0):
|
||||||
self.parent.cpuFormat = str(settings.get('cpuFormat', '[cpu: $cpu%]'))
|
self.parent.cpuFormat = str(settings.get('cpuFormat', '[cpu: $cpu%]'))
|
||||||
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat):
|
||||||
self.parent.label_cpu0 = Plasma.Label(self.parent.applet)
|
self.parent.label_cpu = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
self.parent.label_cpu1 = Plasma.Label(self.parent.applet)
|
self.parent.label_cpu1 = Plasma.Label(self.parent.applet)
|
||||||
if (self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[0]):
|
if (self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] != self.parent.cpuFormat.split('$ccpu')[0]):
|
||||||
line = self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[1]
|
line = self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$ccpu')[0].split('$cpu')[1]
|
||||||
else:
|
else:
|
||||||
line = self.parent.cpuFormat.split('$ccpu')[0]
|
line = self.parent.cpuFormat.split('$ccpu')[0]
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_cpu0.setText(text)
|
self.parent.label_cpu.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_cpu0)
|
self.parent.layout.addItem(self.parent.label_cpu)
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
||||||
for core in range(self.parent.numCores):
|
for core in range(self.parent.numCores):
|
||||||
exec ('self.parent.label_coreCpu' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
exec ('self.parent.label_coreCpu' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
||||||
@ -75,7 +75,7 @@ class Reinit():
|
|||||||
self.parent.label_cpu1.setText(text)
|
self.parent.label_cpu1.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_cpu1)
|
self.parent.layout.addItem(self.parent.label_cpu1)
|
||||||
else:
|
else:
|
||||||
self.parent.label_cpu = Plasma.Label(self.parent.applet)
|
self.parent.label_cpu = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
if (self.parent.cpuFormat.split('$cpu')[0] != self.parent.cpuFormat):
|
if (self.parent.cpuFormat.split('$cpu')[0] != self.parent.cpuFormat):
|
||||||
line = self.parent.cpuFormat.split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$cpu')[1]
|
line = self.parent.cpuFormat.split('$cpu')[0] + '-----' + self.parent.cpuFormat.split('$cpu')[1]
|
||||||
else:
|
else:
|
||||||
@ -87,7 +87,7 @@ class Reinit():
|
|||||||
if (self.parent.tempBool > 0):
|
if (self.parent.tempBool > 0):
|
||||||
self.parent.tempdev = str(settings.get('temp_device', '<select device>'))
|
self.parent.tempdev = str(settings.get('temp_device', '<select device>'))
|
||||||
self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp°C]'))
|
self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp°C]'))
|
||||||
self.parent.label_temp = Plasma.Label(self.parent.applet)
|
self.parent.label_temp = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
if (self.parent.tempFormat.split('$temp')[0] != self.parent.tempFormat):
|
if (self.parent.tempFormat.split('$temp')[0] != self.parent.tempFormat):
|
||||||
line = self.parent.tempFormat.split('$temp')[0] + '----' + self.parent.tempFormat.split('$temp')[1]
|
line = self.parent.tempFormat.split('$temp')[0] + '----' + self.parent.tempFormat.split('$temp')[1]
|
||||||
else:
|
else:
|
||||||
@ -110,7 +110,7 @@ class Reinit():
|
|||||||
else:
|
else:
|
||||||
line = self.parent.memFormat
|
line = self.parent.memFormat
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_mem = Plasma.Label(self.parent.applet)
|
self.parent.label_mem = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
self.parent.label_mem.setText(text)
|
self.parent.label_mem.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_mem)
|
self.parent.layout.addItem(self.parent.label_mem)
|
||||||
elif (order == "4"):
|
elif (order == "4"):
|
||||||
@ -127,7 +127,7 @@ class Reinit():
|
|||||||
else:
|
else:
|
||||||
line = self.parent.swapFormat
|
line = self.parent.swapFormat
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_swap = Plasma.Label(self.parent.applet)
|
self.parent.label_swap = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
self.parent.label_swap.setText(text)
|
self.parent.label_swap.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_swap)
|
self.parent.layout.addItem(self.parent.label_swap)
|
||||||
elif (order == "5"):
|
elif (order == "5"):
|
||||||
@ -142,7 +142,7 @@ class Reinit():
|
|||||||
self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1]
|
self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1]
|
||||||
else:
|
else:
|
||||||
self.parent.netFormat = self.parent.netNonFormat
|
self.parent.netFormat = self.parent.netNonFormat
|
||||||
self.parent.label_netDown = Plasma.Label(self.parent.applet)
|
self.parent.label_netDown = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat):
|
||||||
line = self.parent.netFormat.split('$net')[0] + '----'
|
line = self.parent.netFormat.split('$net')[0] + '----'
|
||||||
else:
|
else:
|
||||||
@ -163,7 +163,7 @@ class Reinit():
|
|||||||
self.parent.batFormat = str(settings.get('batFormat', '[bat: $bat%$ac]'))
|
self.parent.batFormat = str(settings.get('batFormat', '[bat: $bat%$ac]'))
|
||||||
self.parent.battery_device= str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))
|
self.parent.battery_device= str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))
|
||||||
self.parent.ac_device = str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))
|
self.parent.ac_device = str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))
|
||||||
self.parent.label_bat = Plasma.Label(self.parent.applet)
|
self.parent.label_bat = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
line = self.parent.batFormat
|
line = self.parent.batFormat
|
||||||
if (line.split('$ac')[0] != line):
|
if (line.split('$ac')[0] != line):
|
||||||
line = line.split('$ac')[0] + '(-)' + line.split('$ac')[1]
|
line = line.split('$ac')[0] + '(-)' + line.split('$ac')[1]
|
||||||
@ -173,18 +173,18 @@ class Reinit():
|
|||||||
self.parent.label_bat.setText(text)
|
self.parent.label_bat.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_bat)
|
self.parent.layout.addItem(self.parent.label_bat)
|
||||||
elif (order == "7"):
|
elif (order == "7"):
|
||||||
if (self.parent.cpuclockBoo> 0):
|
if (self.parent.cpuclockBool > 0):
|
||||||
self.parent.cpuclockFormat = str(settings.get('cpuclockFormat', '[mhz: $cpucl]'))
|
self.parent.cpuclockFormat = str(settings.get('cpuclockFormat', '[mhz: $cpucl]'))
|
||||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat):
|
if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat):
|
||||||
self.parent.label_cpuclock0 = Plasma.Label(self.parent.applet)
|
self.parent.label_cpuclock = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
self.parent.label_cpuclock1 = Plasma.Label(self.parent.applet)
|
self.parent.label_cpuclock1 = Plasma.Label(self.parent.applet)
|
||||||
if (self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[0]):
|
if (self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] != self.parent.cpuclockFormat.split('$ccpucl')[0]):
|
||||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[1]
|
line = self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[1]
|
||||||
else:
|
else:
|
||||||
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
line = self.parent.cpuclockFormat.split('$ccpucl')[0]
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_cpuclock0.setText(text)
|
self.parent.label_cpuclock.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_cpuclock0)
|
self.parent.layout.addItem(self.parent.label_cpuclock)
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + "----" + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + "----" + self.parent.formatLine.split('$LINE')[1]
|
||||||
for core in range(self.parent.numCores):
|
for core in range(self.parent.numCores):
|
||||||
exec ('self.parent.label_coreCpuclock' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
exec ('self.parent.label_coreCpuclock' + str(core) + ' = Plasma.Label(self.parent.applet)')
|
||||||
@ -198,7 +198,7 @@ class Reinit():
|
|||||||
self.parent.label_cpuclock1.setText(text)
|
self.parent.label_cpuclock1.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_cpuclock1)
|
self.parent.layout.addItem(self.parent.label_cpuclock1)
|
||||||
else:
|
else:
|
||||||
self.parent.label_cpuclock = Plasma.Label(self.parent.applet)
|
self.parent.label_cpuclock = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
if (self.parent.cpuclockFormat.split('$cpucl')[0] != self.parent.cpuclockFormat):
|
if (self.parent.cpuclockFormat.split('$cpucl')[0] != self.parent.cpuclockFormat):
|
||||||
line = self.parent.cpuclockFormat.split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$cpucl')[1]
|
line = self.parent.cpuclockFormat.split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$cpucl')[1]
|
||||||
else:
|
else:
|
||||||
@ -246,7 +246,7 @@ class Reinit():
|
|||||||
self.parent.mountPoints = self.parent.hddFormat.split('@@')[1].split(';')
|
self.parent.mountPoints = self.parent.hddFormat.split('@@')[1].split(';')
|
||||||
line = self.parent.hddFormat.split('@@')[0]
|
line = self.parent.hddFormat.split('@@')[0]
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1]
|
||||||
self.parent.label_hdd0 = Plasma.Label(self.parent.applet)
|
self.parent.label_hdd0 = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
self.parent.label_hdd0.setText(text)
|
self.parent.label_hdd0.setText(text)
|
||||||
self.parent.layout.addItem(self.parent.label_hdd0)
|
self.parent.layout.addItem(self.parent.label_hdd0)
|
||||||
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1]
|
||||||
@ -267,7 +267,7 @@ class Reinit():
|
|||||||
elif (order == "c"):
|
elif (order == "c"):
|
||||||
if (self.parent.hddtempBool > 0):
|
if (self.parent.hddtempBool > 0):
|
||||||
self.parent.hddtempFormat = str(settings.get('hddtempFormat', '[hdd temp: @@/dev/sda@@°C]'))
|
self.parent.hddtempFormat = str(settings.get('hddtempFormat', '[hdd temp: @@/dev/sda@@°C]'))
|
||||||
self.parent.label_hddtemp = Plasma.Label(self.parent.applet)
|
self.parent.label_hddtemp = NewPlasmaLabel(self.parent.applet, self.parent)
|
||||||
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat):
|
||||||
line = self.parent.hddtempFormat.split('@@')[0] + '----' + self.parent.hddtempFormat.split('@@')[2]
|
line = self.parent.hddtempFormat.split('@@')[0] + '----' + self.parent.hddtempFormat.split('@@')[2]
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user