diff --git a/README.md b/README.md
index 727964f..44d9cd2 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,8 @@ For edited output you must open Settings window and setup output format in lines
* tag `$swapmb` - swap, *MB*
* tag `$swapgb` - swap, *GB*
* tag `$hddN` - usage for mount point N, *%*. For example, `$hdd0`
+* tag `$hddrN` - read speed of disk N, *KB/s*. For example, `$hddr0`
+* tag `$hddwN` - write speed of disk N, *KB/s*. For example, `$hddw0`
* tag `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
* tag `$down` - download speed, *KB/s*
* tag `$up` - upload speed, *KB/s*
@@ -94,9 +96,13 @@ List of devices, which will be observed in temp label (combo box items come from
List of mount points, which will be observed in hdd label (combo box items come from `mount`). List widget is editable, delete key will remove current item.
-**HDD**
+**HDD (speed)**
-List of hard disk devices, which will be observed in hddtem label (combo box items come from `find`). List widget is editable, delete key will remove current item.
+List of hard disk devices, which will be observed in hddspeed label (combo box items come from DataEngine). List widget is editable, delete key will remove current item.
+
+**HDD (temperature)**
+
+List of hard disk devices, which will be observed in hddtemp label (combo box items come from `find`). List widget is editable, delete key will remove current item.
**Network directory**
diff --git a/sources/ptm/contents/code/configdef.py b/sources/ptm/contents/code/configdef.py
index 600d862..f19cf5a 100644
--- a/sources/ptm/contents/code/configdef.py
+++ b/sources/ptm/contents/code/configdef.py
@@ -61,6 +61,10 @@ class ConfigDefinition:
for i in range(self.configpage.ui.listWidget_hddDevice.count()):
item.append(self.configpage.ui.listWidget_hddDevice.item(i).text())
settings.set('hdd', str(item.join(QString('@@'))))
+ item = QStringList()
+ for i in range(self.configpage.ui.listWidget_hddSpeedDevice.count()):
+ item.append(self.configpage.ui.listWidget_hddSpeedDevice.item(i).text())
+ settings.set('disk', str(item.join(QString('@@'))))
settings.set('netdir', str(self.configpage.ui.lineEdit_netdir.text()))
settings.set('netdevBool', self.configpage.ui.checkBox_netdev.checkState())
settings.set('custom_netdev', str(self.configpage.ui.comboBox_netdev.currentText()))
@@ -168,6 +172,12 @@ class ConfigDefinition:
self.configpage.ui.listWidget_hddDevice.clear()
for item in str(settings.get('hdd', '/dev/sda')).split('@@'):
self.configpage.ui.listWidget_hddDevice.addItem(item)
+ self.configpage.ui.comboBox_hddSpeedDevice.clear()
+ for item in self.defaults['disk']:
+ self.configpage.ui.comboBox_hddSpeedDevice.addItem(item)
+ self.configpage.ui.listWidget_hddSpeedDevice.clear()
+ for item in str(settings.get('disk', 'disk/sda_(8:0)')).split('@@'):
+ self.configpage.ui.listWidget_hddSpeedDevice.addItem(item)
self.configpage.ui.lineEdit_netdir.setText(str(settings.get('netdir', '/sys/class/net')))
self.configpage.ui.checkBox_netdev.setCheckState(settings.get('netdevBool', 0).toInt()[0])
for item in QDir.entryList(QDir(str(settings.get('netdir', '/sys/class/net'))), QDir.Dirs | QDir.NoDotAndDotDot):
diff --git a/sources/ptm/contents/code/configwindow.py b/sources/ptm/contents/code/configwindow.py
index c720132..6b34a5b 100644
--- a/sources/ptm/contents/code/configwindow.py
+++ b/sources/ptm/contents/code/configwindow.py
@@ -36,34 +36,35 @@ class ConfigWindow(QWidget):
'up':self.ui.kcolorcombo_up}
self.checkboxes = {'bat':self.ui.checkBox_bat, 'cpu':self.ui.checkBox_cpu,
'cpuclock':self.ui.checkBox_cpuclock, 'custom':self.ui.checkBox_custom,
- 'gpu':self.ui.checkBox_gpu, 'gputemp':self.ui.checkBox_gpuTemp,
- 'hdd':self.ui.checkBox_hdd, 'hddtemp':self.ui.checkBox_hddTemp,
- 'mem':self.ui.checkBox_mem, 'net':self.ui.checkBox_net,
- 'swap':self.ui.checkBox_swap, 'temp':self.ui.checkBox_temp,
- 'uptime':self.ui.checkBox_uptime, 'pkg':self.ui.checkBox_pkg,
- 'player':self.ui.checkBox_player, 'ps':self.ui.checkBox_ps,
- 'time':self.ui.checkBox_time}
+ 'disk':self.ui.checkBox_hddSpeed, 'gpu':self.ui.checkBox_gpu,
+ 'gputemp':self.ui.checkBox_gpuTemp, 'hdd':self.ui.checkBox_hdd,
+ 'hddtemp':self.ui.checkBox_hddTemp, 'mem':self.ui.checkBox_mem,
+ 'net':self.ui.checkBox_net, 'swap':self.ui.checkBox_swap,
+ 'temp':self.ui.checkBox_temp, 'uptime':self.ui.checkBox_uptime,
+ 'pkg':self.ui.checkBox_pkg, 'player':self.ui.checkBox_player,
+ 'ps':self.ui.checkBox_ps, 'time':self.ui.checkBox_time}
self.lineedits = {'bat':self.ui.lineEdit_bat, 'cpu':self.ui.lineEdit_cpu,
'cpuclock':self.ui.lineEdit_cpuclock, 'custom':self.ui.lineEdit_custom,
- 'gpu':self.ui.lineEdit_gpu, 'gputemp':self.ui.lineEdit_gpuTemp,
- 'hdd':self.ui.lineEdit_hdd, 'hddtemp':self.ui.lineEdit_hddTemp,
- 'mem':self.ui.lineEdit_mem, 'net':self.ui.lineEdit_net,
- 'swap':self.ui.lineEdit_swap, 'temp':self.ui.lineEdit_temp,
- 'uptime':self.ui.lineEdit_uptime, 'pkg':self.ui.lineEdit_pkg,
- 'player':self.ui.lineEdit_player, 'ps':self.ui.lineEdit_ps,
- 'time':self.ui.lineEdit_time}
+ 'disk':self.ui.lineEdit_hddSpeed, 'gpu':self.ui.lineEdit_gpu,
+ 'gputemp':self.ui.lineEdit_gpuTemp, 'hdd':self.ui.lineEdit_hdd,
+ 'hddtemp':self.ui.lineEdit_hddTemp, 'mem':self.ui.lineEdit_mem,
+ 'net':self.ui.lineEdit_net, 'swap':self.ui.lineEdit_swap,
+ 'temp':self.ui.lineEdit_temp, 'uptime':self.ui.lineEdit_uptime,
+ 'pkg':self.ui.lineEdit_pkg, 'player':self.ui.lineEdit_player,
+ 'ps':self.ui.lineEdit_ps, 'time':self.ui.lineEdit_time}
self.sliders = {'bat':self.ui.slider_bat, 'cpu':self.ui.slider_cpu,
'cpuclock':self.ui.slider_cpuclock, 'custom':self.ui.slider_custom,
- 'gpu':self.ui.slider_gpu, 'gputemp':self.ui.slider_gpuTemp,
- 'hdd':self.ui.slider_hdd, 'hddtemp':self.ui.slider_hddTemp,
- 'mem':self.ui.slider_mem, 'net':self.ui.slider_net,
- 'swap':self.ui.slider_swap, 'temp':self.ui.slider_temp,
- 'uptime':self.ui.slider_uptime, 'pkg':self.ui.slider_pkg,
- 'player':self.ui.slider_player, 'ps':self.ui.slider_ps,
- 'time':self.ui.slider_time}
+ 'disk':self.ui.slider_hddSpeed, 'gpu':self.ui.slider_gpu,
+ 'gputemp':self.ui.slider_gpuTemp, 'hdd':self.ui.slider_hdd,
+ 'hddtemp':self.ui.slider_hddTemp, 'mem':self.ui.slider_mem,
+ 'net':self.ui.slider_net, 'swap':self.ui.slider_swap,
+ 'temp':self.ui.slider_temp, 'uptime':self.ui.slider_uptime,
+ 'pkg':self.ui.slider_pkg, 'player':self.ui.slider_player,
+ 'ps':self.ui.slider_ps, 'time':self.ui.slider_time}
QObject.connect(self.ui.checkBox_netdev, SIGNAL("stateChanged(int)"), self.setNetdevEnabled)
QObject.connect(self.ui.pushButton_hddDevice, SIGNAL("clicked()"), self.addHddDevice)
+ QObject.connect(self.ui.pushButton_hddSpeedDevice, SIGNAL("clicked()"), self.addHddSpeedDevice)
QObject.connect(self.ui.pushButton_mount, SIGNAL("clicked()"), self.addMount)
QObject.connect(self.ui.pushButton_tempDevice, SIGNAL("clicked()"), self.addTempDevice)
QObject.connect(self.ui.pushButton_pkgCommand, SIGNAL("clicked()"), self.addPkgCommand)
@@ -85,6 +86,9 @@ class ConfigWindow(QWidget):
if (self.ui.listWidget_hddDevice.hasFocus() and
(self.ui.listWidget_hddDevice.currentRow() > -1)):
self.ui.listWidget_hddDevice.takeItem(self.ui.listWidget_hddDevice.currentRow())
+ elif (self.ui.listWidget_hddSpeedDevice.hasFocus() and
+ (self.ui.listWidget_hddSpeedDevice.currentRow() > -1)):
+ self.ui.listWidget_hddSpeedDevice.takeItem(self.ui.listWidget_hddSpeedDevice.currentRow())
elif (self.ui.listWidget_mount.hasFocus() and
(self.ui.listWidget_mount.currentRow() > -1)):
self.ui.listWidget_mount.takeItem(self.ui.listWidget_mount.currentRow())
@@ -102,6 +106,12 @@ class ConfigWindow(QWidget):
self.ui.listWidget_hddDevice.addItem(self.ui.comboBox_hddDevice.currentText())
+ def addHddSpeedDevice(self):
+ """function to add disk device"""
+ self.ui.listWidget_hddSpeedDevice.clearSelection()
+ self.ui.listWidget_hddSpeedDevice.addItem(self.ui.comboBox_hddSpeedDevice.currentText())
+
+
def addMount(self):
"""function to add mount points"""
self.ui.listWidget_mount.clearSelection()
diff --git a/sources/ptm/contents/code/dataengine.py b/sources/ptm/contents/code/dataengine.py
index fa3cf6b..3c257c0 100644
--- a/sources/ptm/contents/code/dataengine.py
+++ b/sources/ptm/contents/code/dataengine.py
@@ -47,6 +47,10 @@ class DataEngine:
dataEngines['system'].connectSource("cpu/cpu" + str(core) + "/clock", self.parent, interval)
if (bools['custom'] > 0):
dataEngines['ext'].connectSource("custom", self.parent, interval)
+ if (bools['disk'] > 0):
+ for item in names['disk']:
+ dataEngines['system'].connectSource(item + "/Rate/rblk", self.parent, interval)
+ dataEngines['system'].connectSource(item + "/Rate/wblk", self.parent, interval)
if (bools['gpu'] > 0):
dataEngines['ext'].connectSource("gpu", self.parent, interval)
if (bools['gputemp'] > 0):
@@ -116,6 +120,16 @@ class DataEngine:
updatedData['name'] = "custom"
value = str(data[QString(u'custom')].toUtf8()).decode("utf-8")
updatedData['value'] = value
+ elif ((sourceName[:4] == "disk") and (sourceName[-4:] == "rblk")):
+ updatedData['name'] = "disk-r"
+ updatedData['type'] = '/'.join(str(sourceName).split('/')[0:2])
+ value = round(data[QString(u'value')].toFloat()[0], 0)
+ updatedData['value'] = value
+ elif ((sourceName[:4] == "disk") and (sourceName[-4:] == "wblk")):
+ updatedData['name'] = "disk-w"
+ updatedData['type'] = '/'.join(str(sourceName).split('/')[0:2])
+ value = round(data[QString(u'value')].toFloat()[0], 0)
+ updatedData['value'] = value
elif (sourceName == "gpu"):
updatedData['name'] = "gpu"
value = round(data[QString(u'GPU')], 1)
@@ -282,6 +296,10 @@ class DataEngine:
dataEngines['system'].disconnectSource("cpu/cpu" + str(item) + "/clock", self.parent)
elif (name == "custom"):
dataEngines['ext'].disconnectSource("custom", self.parent)
+ elif (name == "disk"):
+ for item in keys['disk']:
+ dataEngines['system'].disconnectSource(item + "/Rate/rblk", self.parent)
+ dataEngines['system'].disconnectSource(item + "/Rate/rblk", self.parent)
elif (name == "gpu"):
dataEngines['ext'].disconnectSource("gpu", self.parent)
elif (name == "gputemp"):
diff --git a/sources/ptm/contents/code/main.py b/sources/ptm/contents/code/main.py
index c3cffbb..15e06c4 100644
--- a/sources/ptm/contents/code/main.py
+++ b/sources/ptm/contents/code/main.py
@@ -106,7 +106,7 @@ class pyTextWidget(plasmascript.Applet):
"""function to create actions"""
self.ptmActions = {}
self.ptmActions['ksysguard'] = QAction(i18n("Run ksysguard"), self)
- QObject.connect(self.ptmActions['ksysguard'], SIGNAL("triggered(bool)"), self.showReadme)
+ QObject.connect(self.ptmActions['ksysguard'], SIGNAL("triggered(bool)"), self.runKsysguard)
self.ptmActions['readme'] = QAction(i18n("Show README"), self)
QObject.connect(self.ptmActions['readme'], SIGNAL("triggered(bool)"), self.showReadme)
@@ -119,6 +119,11 @@ class pyTextWidget(plasmascript.Applet):
return contextMenu
+ def runKsysguard(self, event):
+ """function to run ksysguard"""
+ os.system("ksysguard &")
+
+
def showReadme(self):
"""function to show readme file"""
kdehome = unicode(KGlobal.dirs().localkdedir())
@@ -138,12 +143,13 @@ class pyTextWidget(plasmascript.Applet):
os.system("kioclient exec " + str(filePath) + " &")
- def runKsysguard(self, event):
- """function to run ksysguard"""
- os.system("ksysguard &")
-
-
# internal functions
+ def addDiskDevice(self, sourceName):
+ diskRegexp = QRegExp("disk/(?:md|sd|hd)[a-z|0-9]_.*/Rate/(?:rblk)")
+ if (diskRegexp.indexIn(sourceName) > -1):
+ self.ptm['defaults']['disk'].append('/'.join(str(sourceName).split('/')[0:2]))
+
+
def createConfigurationInterface(self, parent):
"""function to setup configuration window"""
self.configpage = configwindow.ConfigWindow(self)
@@ -182,38 +188,41 @@ class pyTextWidget(plasmascript.Applet):
# defaults
self.ptm['defaults'] = {}
self.ptm['defaults']['confBool'] = {'bat':'batBool', 'cpu':'cpuBool',
- 'cpuclock':'cpuclockBool', 'custom':'customBool', 'gpu':'gpuBool',
- 'gputemp':'gputempBool', 'hdd':'hddBool', 'hddtemp':'hddtempBool',
- 'mem':'memBool', 'net':'netBool', 'pkg':'pkgBool', 'player':'playerBool',
- 'ps':'psBool', 'swap':'swapBool', 'temp':'tempBool', 'uptime':'uptimeBool',
- 'time':'timeBool'}
+ 'cpuclock':'cpuclockBool', 'custom':'customBool', 'disk':'diskBool',
+ 'gpu':'gpuBool', 'gputemp':'gputempBool', 'hdd':'hddBool',
+ 'hddtemp':'hddtempBool', 'mem':'memBool', 'net':'netBool', 'pkg':'pkgBool',
+ 'player':'playerBool', 'ps':'psBool', 'swap':'swapBool', 'temp':'tempBool',
+ 'uptime':'uptimeBool', 'time':'timeBool'}
self.ptm['defaults']['confColor'] = {'cpu':'cpu_color', 'cpuclock':'cpuclock_color',
'down':'down_color', 'mem':'mem_color', 'swap':'swap_color', 'up':'up_color'}
self.ptm['defaults']['confFormat'] = {'bat':'batFormat', 'cpu':'cpuFormat',
- 'cpuclock':'cpuclockFormat', 'custom':'customFormat', 'gpu':'gpuFormat',
- 'gputemp':'gputempFormat', 'hdd':'hddFormat', 'hddtemp':'hddtempFormat',
- 'mem':'memFormat', 'net':'netFormat', 'pkg':'pkgFormat',
- 'player':'playerFormat', 'ps':'psFormat', 'swap':'swapFormat',
+ 'cpuclock':'cpuclockFormat', 'custom':'customFormat', 'disk':'diskFormat',
+ 'gpu':'gpuFormat', 'gputemp':'gputempFormat', 'hdd':'hddFormat',
+ 'hddtemp':'hddtempFormat', 'mem':'memFormat', 'net':'netFormat',
+ 'pkg':'pkgFormat', 'player':'playerFormat', 'ps':'psFormat', 'swap':'swapFormat',
'temp':'tempFormat', 'time':'timeFormat', 'uptime':'uptimeFormat'}
self.ptm['defaults']['bool'] = {'bat':0, 'cpu':2, 'cpuclock':0, 'custom':0,
- 'gpu':0, 'gputemp':0, 'hdd':0, 'hddtemp':0, 'mem':2, 'net':2, 'pkg':0,
- 'player':0, 'ps':0, 'swap':2, 'temp':0, 'time':0, 'uptime':0}
+ 'disk':0, 'gpu':0, 'gputemp':0, 'hdd':0, 'hddtemp':0, 'mem':2, 'net':2,
+ 'pkg':0, 'player':0, 'ps':0, 'swap':2, 'temp':0, 'time':0, 'uptime':0}
self.ptm['defaults']['format'] = {'bat':'[bat: $bat%$ac]', 'cpu':'[cpu: $cpu%]',
- 'cpuclock':'[mhz: $cpucl]', 'custom':'[$custom]', 'gpu':'[gpu: $gpu%]',
- 'gputemp':'[gpu temp: $gputemp°C]', 'hdd':'[hdd: $hdd0%]',
+ 'cpuclock':'[mhz: $cpucl]', 'custom':'[$custom]', 'disk':'[disk: $hddr0/$hddw0 KB/s]',
+ 'gpu':'[gpu: $gpu%]', 'gputemp':'[gpu temp: $gputemp°C]', 'hdd':'[hdd: $hdd0%]',
'hddtemp':'[hdd temp: $hddtemp0°C]', 'mem':'[mem: $mem%]',
'net':'[$netdev: $down/$upKB/s]', 'pkg':'[upgrade: $pkgcount0]',
'player':'[$artist - $title]', 'ps':'[proc: $pscount]', 'swap':'[swap: $swap%]',
'temp':'[temp: $temp0°C]', 'time':'[$time]', 'uptime':'[uptime: $uptime]'}
self.ptm['defaults']['order'] = {'1':'cpu', '2':'temp', '3':'mem', '4':'swap', '5':'net',
'6':'bat', '7':'cpuclock', '8':'uptime', '9':'gpu', 'a':'gputemp', 'b':'hdd',
- 'c':'hddtemp', 'd':'player', 'e':'time', 'f':'custom', 'g':'ps', 'h':'pkg'}
+ 'c':'hddtemp', 'd':'player', 'e':'time', 'f':'custom', 'g':'ps', 'h':'pkg', 'i':'disk'}
+ # disk devices for r/w speed
+ self.ptm['defaults']['disk'] = []
# labels
self.ptm['labels'] = {}
self.ptm['layout'] = QGraphicsLinearLayout(Qt.Horizontal, self.applet)
self.ptm['layout'].setContentsMargins(1, 1, 1, 1)
# names
self.ptm['names'] = {}
+ self.ptm['names']['disk'] = []
self.ptm['names']['hdd'] = []
self.ptm['names']['hddtemp'] = []
self.ptm['names']['net'] = ""
@@ -232,6 +241,8 @@ class pyTextWidget(plasmascript.Applet):
for i in range(numCores):
self.ptm['values']['cpu'][i] = 0.0
self.ptm['values']['cpuclock'][i] = 0.0
+ self.ptm['values']['disk-r'] = {}
+ self.ptm['values']['disk-w'] = {}
self.ptm['values']['hdd'] = {}
self.ptm['values']['hddmb'] = {}
self.ptm['values']['hddtemp'] = {}
@@ -271,6 +282,8 @@ class pyTextWidget(plasmascript.Applet):
self.cpuText()
if (self.ptm['vars']['bools']['cpuclock'] > 0):
self.cpuclockText()
+ if (self.ptm['vars']['bools']['disk'] > 0):
+ self.diskText()
if (self.ptm['vars']['bools']['hdd'] > 0):
self.hddText()
if (self.ptm['vars']['bools']['hddtemp'] > 0):
@@ -393,6 +406,25 @@ class pyTextWidget(plasmascript.Applet):
self.setText("cpuclock", text)
+ def diskText(self):
+ line = self.ptm['vars']['formats']['disk']
+ devices = range(len(self.ptm['names']['disk']))
+ devices.reverse()
+ for i in devices:
+ if (line.split('$hddr' + str(i))[0] != line):
+ hdd = "%4i" % (self.ptm['values']['disk-r'][self.ptm['names']['disk'][i]])
+ line = line.split('$hddr' + str(i))[0] +\
+ hdd +\
+ line.split('$hddr' + str(i))[1]
+ if (line.split('$hddw' + str(i))[0] != line):
+ hdd = "%4i" % (self.ptm['values']['disk-w'][self.ptm['names']['disk'][i]])
+ line = line.split('$hddw' + str(i))[0] +\
+ hdd +\
+ line.split('$hddw' + str(i))[1]
+ text = self.ptm['vars']['app']['format'][0] + line + self.ptm['vars']['app']['format'][1]
+ self.setText("disk", text)
+
+
def hddText(self):
"""function to set hdd text"""
line = self.ptm['vars']['formats']['hdd']
@@ -517,11 +549,16 @@ class pyTextWidget(plasmascript.Applet):
"""function to read settings"""
self.ptm[name] = ptm
if (name == "names"):
- for item in ['hdd', 'hddtemp', 'temp']:
+ for item in ['hddtemp', 'temp']:
for value in self.ptm['names'][item]:
self.ptm['values'][item][value] = 0.0
- if (item == "hdd"):
- self.ptm['values']['hddmb'][value] = 0.0
+ for value in self.ptm['names']['hdd']:
+ self.ptm['values']['hdd'][value] = 0.0
+ self.ptm['values']['hddmb'][value] = 0.0
+ for value in self.ptm['names']['disk']:
+ self.ptm['values']['disk-r'][value] = 0.0
+ self.ptm['values']['disk-w'][value] = 0.0
+
def connectToEngine(self):
@@ -529,6 +566,7 @@ class pyTextWidget(plasmascript.Applet):
self.ptm['dataengine']['ext'] = self.dataEngine("ext-sysmon")
self.ptm['dataengine']['system'] = self.dataEngine("systemmonitor")
self.ptm['dataengine']['time'] = self.dataEngine("time")
+ QObject.connect(self.ptm['dataengine']['system'], SIGNAL("sourceAdded(QString)"), self.addDiskDevice)
self.dataengine.connectToEngine(self.ptm['vars']['bools'], self.ptm['dataengine'],
self.ptm['vars']['app']['interval'], self.ptm['names'])
@@ -539,8 +577,8 @@ class pyTextWidget(plasmascript.Applet):
if (self.ptm['vars']['bools'][label] > 0):
self.addLabel(label, None, False)
keys = {'cpu':self.ptm['values']['cpu'].keys(), 'cpuclock':self.ptm['values']['cpuclock'].keys(),
- 'hdd':self.ptm['values']['hdd'].keys(), 'net':self.ptm['names']['net'],
- 'temp':self.ptm['values']['temp'].keys()}
+ 'disk':self.ptm['values']['disk-r'].keys(), 'hdd':self.ptm['values']['hdd'].keys(),
+ 'net':self.ptm['names']['net'], 'temp':self.ptm['values']['temp'].keys()}
self.dataengine.disconnectFromSource(self.ptm['dataengine'], keys, label)
diff --git a/sources/ptm/contents/code/ptmnotify.py b/sources/ptm/contents/code/ptmnotify.py
index 7e0d933..e2ab115 100644
--- a/sources/ptm/contents/code/ptmnotify.py
+++ b/sources/ptm/contents/code/ptmnotify.py
@@ -194,6 +194,8 @@ class PTMNotify:
return self.createText("processor")
elif (name == "custom"):
return self.createText("system")
+ elif (name == "disk"):
+ return self.createText("disk")
elif (name == "gpu"):
return self.createText("graphical")
elif (name == "gputemp"):
diff --git a/sources/ptm/contents/code/reinit.py b/sources/ptm/contents/code/reinit.py
index fae5857..8de79bb 100644
--- a/sources/ptm/contents/code/reinit.py
+++ b/sources/ptm/contents/code/reinit.py
@@ -71,6 +71,7 @@ class Reinit():
ptmVars['bools'][label] = settings.get(self.defaults['confBool'][label], self.defaults['bool'][label]).toInt()[0]
ptmNames = {}
+ ptmNames['disk'] = str(settings.get('disk', 'disk/sda_(8:0)')).split('@@')
ptmNames['hdd'] = str(settings.get('mount', '/')).split('@@')
ptmNames['hddtemp'] = str(settings.get('hdd', '/dev/sda')).split('@@')
if (ptmVars['adv']['netdevBool'] > 0):
diff --git a/sources/ptm/contents/ui/configwindow.ui b/sources/ptm/contents/ui/configwindow.ui
index 44f3ee0..0f11c86 100644
--- a/sources/ptm/contents/ui/configwindow.ui
+++ b/sources/ptm/contents/ui/configwindow.ui
@@ -66,7 +66,7 @@
0
0
526
- 624
+ 660
@@ -114,7 +114,7 @@ $custom - custom time format
1
- 17
+ 18
1
@@ -170,7 +170,7 @@ $custom - custom format
1
- 17
+ 18
1
@@ -236,7 +236,7 @@ $cpuN - load CPU for core N, %
1
- 17
+ 18
1
@@ -302,7 +302,7 @@ $cpuclN - CPU clock for core N, MHz
1
- 17
+ 18
1
@@ -360,7 +360,7 @@ $cpuclN - CPU clock for core N, MHz
1
- 17
+ 18
1
@@ -418,7 +418,7 @@ $cpuclN - CPU clock for core N, MHz
1
- 17
+ 18
1
@@ -476,7 +476,7 @@ $cpuclN - CPU clock for core N, MHz
1
- 17
+ 18
1
@@ -539,7 +539,7 @@ $memgb - RAM usage, GB
1
- 17
+ 18
1
@@ -602,7 +602,7 @@ $swapgb - swap usage, GB
1
- 17
+ 18
1
@@ -662,7 +662,7 @@ $hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0
1
- 17
+ 18
1
@@ -680,6 +680,65 @@ $hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0
+ -
+
+
-
+
+
+
+ 120
+ 0
+
+
+
+ HDD speed
+
+
+ true
+
+
+
+ -
+
+
+ $hddrN - read speed HDD N (from 0), KB/s. Example: $hddr0
+$hddwN - write speed HDD N (from 0), KB/s. Example: $hddw0
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+
+ 120
+ 16777215
+
+
+
+ 1
+
+
+ 18
+
+
+ 1
+
+
+ 11
+
+
+ Qt::Horizontal
+
+
+ QSlider::TicksAbove
+
+
+
+
+
-
-
@@ -691,7 +750,7 @@ $hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0
- HDD Temp
+ HDD temp
true
@@ -720,13 +779,13 @@ $hddgbN - usage for mount point N (from 0), GB. Example: $hddgb0
1
- 17
+ 18
1
- 11
+ 12
Qt::Horizontal
@@ -783,13 +842,13 @@ $netdev - current network device
1
- 17
+ 18
1
- 12
+ 13
Qt::Horizontal
@@ -842,13 +901,13 @@ $ac - AC status
1
- 17
+ 18
1
- 13
+ 14
Qt::Horizontal
@@ -904,13 +963,13 @@ $title - song title
1
- 17
+ 18
1
- 14
+ 15
Qt::Horizontal
@@ -964,13 +1023,13 @@ $ps - list of running processes comma separated
1
- 17
+ 18
1
- 15
+ 16
Qt::Horizontal
@@ -1022,13 +1081,13 @@ $ps - list of running processes comma separated
1
- 17
+ 18
1
- 16
+ 17
Qt::Horizontal
@@ -1080,13 +1139,13 @@ $ps - list of running processes comma separated
1
- 17
+ 18
1
- 17
+ 18
Qt::Horizontal
@@ -1131,9 +1190,9 @@ $ps - list of running processes comma separated
0
- -102
+ 0
526
- 642
+ 754
@@ -1370,6 +1429,58 @@ del - remove item
Editable
+del - remove item
+
+
+
+
+
+ -
+
+
-
+
+
-
+
+
+
+ 120
+ 0
+
+
+
+ HDD devices (speed)
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ -
+
+
+
+ 100
+ 0
+
+
+
+ Add
+
+
+
+
+
+ -
+
+
+ Editable
del - remove item
@@ -1389,7 +1500,7 @@ del - remove item
- HDD devices
+ HDD devices (temp)
@@ -1697,8 +1808,8 @@ del - remove item
0
0
- 544
- 504
+ 326
+ 227
@@ -2031,8 +2142,8 @@ del - remove item
0
0
- 544
- 540
+ 326
+ 190
@@ -2365,8 +2476,8 @@ del - remove item
0
0
- 544
- 540
+ 326
+ 302
@@ -2736,6 +2847,9 @@ del - remove item
lineEdit_hdd
slider_hdd
checkBox_hddTemp
+ checkBox_hddSpeed
+ lineEdit_hddSpeed
+ slider_hddSpeed
lineEdit_hddTemp
slider_hddTemp
checkBox_net
@@ -2766,6 +2880,9 @@ del - remove item
comboBox_mount
pushButton_mount
listWidget_mount
+ comboBox_hddSpeedDevice
+ pushButton_hddSpeedDevice
+ listWidget_hddSpeedDevice
comboBox_hddDevice
pushButton_hddDevice
listWidget_hddDevice
diff --git a/sources/readme/ru.md b/sources/readme/ru.md
index 47cb891..4e0cd9f 100644
--- a/sources/readme/ru.md
+++ b/sources/readme/ru.md
@@ -29,6 +29,8 @@ PyTextMonitor - минималистичный плазмоид, написан
* тег `$swapmb` - swap, *MB*
* тег `$swapgb` - swap, *GB*
* тег `$hddN` - использование точки монтирования N, *%*. Например, `$hdd0`
+* тег `$hddrN` - скорость записи на диск N, *KB/s*. Например, `$hddr0`
+* тег `$hddwN` - скорость чтения с диска N, *KB/s*. Например, `$hddw0`
* тег `$hddtempN` - температура HDD N. Например, `$hddtemp0`
* тег `$down` - скорость загрузки, *KB/s*
* тег `$up` - скорость отдачи, *KB/s*
@@ -92,7 +94,11 @@ PyTextMonitor - минималистичный плазмоид, написан
Список точек монтирования, которые будут наблюдаться в поле hdd (содержимое комбо бокса берется из `mount`). Виджет редактируем, клавиша delete удалит текущую строку.
-**HDD**
+**HDD (скорость)**
+
+Список HDD, которые будут наблюдаться в поле hddspeed (содержимое комбо бокса берется из DataEngine). Виджет редактируем, клавиша delete удалит текущую строку.
+
+**HDD (температура)**
Список HDD, которые будут наблюдаться в поле hddtemp (содержимое комбо бокса берется из `find`). Виджет редактируем, клавиша delete удалит текущую строку.