diff --git a/CHANGELOG b/CHANGELOG
index df2599e..e0152a1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+Ver.1.7.0:
++ added support of several tags in temperature label
++ added tags $cpuN, $cpuclN, $hddN, $tempN, $hddtempN, $up, $down
++ added label with custom command
+- removed tags @@...@@, $temp, $ccpu, $ccpucl, $net
+* changes in settings
+* ptm now does not require net-tools
+* refactoring
+
Ver.1.6.1:
+ added support of several devices in hddtemp label
- fixed #6
diff --git a/README.md b/README.md
index dbef366..e67319f 100644
--- a/README.md
+++ b/README.md
@@ -14,55 +14,81 @@ For edited output you must open Settings window and setup output format in lines
* label `$isotime` - time in iso format
* label `$shorttime` - time in short locale format
* label `$longtime` - time in long locale format
-* label `$custom` - will enable custom time format
-* label `$dddd` - weekday in long format (required `$custom` flag)
-* label `$ddd` - weekday in short format (required `$custom` flag)
-* label `$dd` - day (required `$custom` flag)
-* label `$d` - day without zero (required `$custom` flag)
-* label `$MMMM` - month in long format (required `$custom` flag)
-* label `$MMM` - month in short format (required `$custom` flag)
-* label `$MM` - month (required `$custom` flag)
-* label `$M` - month without zero (required `$custom` flag)
-* label `$yyyy` - year (required `$custom` flag)
-* label `$yy` - year in short format (required `$custom` flag)
-* label `$hh` - hours (required `$custom` flag)
-* label `$h` - hours without zero (required `$custom` flag)
-* label `$mm` - minutes (required `$custom` flag)
-* label `$m` - minutes without zero (required `$custom` flag)
-* label `$ss` - seconds (required `$custom` flag)
-* label `$s` - seconds without zero (required `$custom` flag)
+* label `$custom` - custom time format
* label `$uptime` - uptime, ---d--h--m
-* label `$custom` - will enable custom uptime format
-* label `$ds` - uptime days (required `$custom` flag)
-* label `$hs` - uptime hours (required `$custom` flag)
-* label `$ms` - uptime minutes (required `$custom` flag)
+* label `$custom` - custom uptime format
* label `$cpu` - total load cpu, %
-* label `$ccpu` - load CPU for each core, %
+* label `$cpuN` - load CPU for core N, %. N should be in range 0 to 8
* label `$cpucl` - average cpu clock, MHz
-* label `$ccpucl` - cpu clock for each core, MHz
-* label `$temp` - average temperature in system
+* label `$cpuclN` - cpu clock for core N, MHz. N should be in range 0 to 8
+* label `$tempN` - temperature for device N. For example, `$temp0`
* label `$gpu` - GPU usage, %. `aticonfig` or `nvidia-smi` must be installed
* label `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
* label `$mem` - usage memory, %
* label `$memmb` - usage memory, MB
* label `$swap` - swap, %
* label `$swapmb` - swap, MB
-* label `@@/@@` (in hdd label) - mount point (`/` in example) usage, %. Separator for mount points list is `;`, for example `@@/;/home;/mnt/global@@`
-* label `@@/dev/sda@@` (in hddtemp label) - HDD (`/dev/sda` in example) temperature. Separator for device list is `;`, for example `@@/dev/sda;/dev/sdb@@`. `hddtemp` must be installed
-* label `$net` - download and upload speed, KB/s. You may specify network device: something like `@@eth0@@`
+* label `$hddN` - usage for mount point N, %. For example, `$hdd0`
+* label `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
+* label `$down` - download speed, KB/s
+* label `$up` - upload speed, KB/s
* label `$netdev` - current network device
-* label `$bat` - battery charge, %. Battery device may be set below. File (`/sys/class/power_supply/BAT0/capacity` by default) must contain only battery charge in percent
-* label `$ac` - status AC device. Return (*) if AC device is online or ( ) if offline. AC device may be set below. FIle (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online
-* label `$artist` - current song artist. One of supported music players must be installed
+* label `$bat` - battery charge, %
+* label `$ac` - status AC device. Return (*) if AC device is online or ( ) if offline
* label `$album` - current song album. One of supported music players must be installed
+* label `$artist` - current song artist. One of supported music players must be installed
* label `$progress` - current song progress. One of supported music players must be installed (mpd does not support yet)
* label `$time` - current song duration. One of supported music players must be installed
* label `$title` - current song title. One of supported music players must be installed
+* label `$custom` - returns output for custom command
Label order will changed if you change slider position. HTML tags in label work normally.
**NOTE** you don't may set to show $cpu in swap label for example. $cpu will work only in cpu label.
+Advanced settings
+-----------------
+**Custom time**
+* label `$dddd` - weekday in long format
+* label `$ddd` - weekday in short format
+* label `$dd` - day
+* label `$d` - day without zero
+* label `$MMMM` - month in long format
+* label `$MMM` - month in short format
+* label `$MM` - month
+* label `$M` - month without zero
+* label `$yyyy` - year
+* label `$yy` - year in short format
+* label `$hh` - hours
+* label `$h` - hours without zero
+* label `$mm` - minutes
+* label `$m` - minutes without zero
+* label `$ss` - seconds
+* label `$s` - seconds without zero
+**Custom uptime**
+* label `$ds` - uptime days
+* label `$hs` - uptime hours
+* label `$ms` - uptime minutes
+**Temperature devices**
+List of devices, which will be observed in temp label (combo box items come from `sensors`). List widget is editable, delete key will remove current item.
+**Mount points**
+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**
+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.
+**Network directory**
+Path to directory, which contains network devices information. Default is `/sys/class/net`. Required for auto select network device.
+**Network device**
+Use specified device as active. Combo box items come from **network directory**. Will disable auto select network device.
+**Battery device**
+File with battery information. File (`/sys/class/power_supply/BAT0/capacity` by default) should contain only battery charge in percent.
+**AC device**
+File with AC information. File (`/sys/class/power_supply/AC/online` by default) must contain `1` if AC is online.
+**Music player**
+Select one of supported music playes for player label.
+**Custom command**
+**NOTE** This can cause the computer freeze.
+A command, which will be run for custom label.
+
DataEngine configuration
------------------------
You may edit DataEngine configuration. It is `/usr/share/config/extsysmon.conf` or `$HOME/share/config/extsysmon.conf` depending on the type of installation. Uncomment needed line and edit it.
@@ -84,7 +110,6 @@ Dependencies
* kdebase-workspace
* kdebindings-python2
* lm_sensors (for definition temperature device)
-* net-tools (for definition network device)
* sysstat (for notification)
Optional dependencies
diff --git a/sources/ptm/contents/code/configwindow.py b/sources/ptm/contents/code/configwindow.py
index f8774ea..2656822 100644
--- a/sources/ptm/contents/code/configwindow.py
+++ b/sources/ptm/contents/code/configwindow.py
@@ -85,16 +85,25 @@ class ConfigWindow(QWidget):
def addHddDevice(self):
"""function to add mount points"""
+ self.ui.listWidget_hddDevice.clearSelection()
+ if (self.ui.listWidget_hddDevice.count() > 9):
+ self.ui.listWidget_hddDevice.takeItem(0)
self.ui.listWidget_hddDevice.addItem(self.ui.comboBox_hddDevice.currentText())
def addMount(self):
"""function to add mount points"""
+ self.ui.listWidget_mount.clearSelection()
+ if (self.ui.listWidget_mount.count() > 9):
+ self.ui.listWidget_mount.takeItem(0)
self.ui.listWidget_mount.addItem(self.ui.comboBox_mount.currentText())
def addTempDevice(self):
"""function to add temperature device"""
+ self.ui.listWidget_tempDevice.clearSelection()
+ if (self.ui.listWidget_tempDevice.count() > 9):
+ self.ui.listWidget_tempDevice.takeItem(0)
self.ui.listWidget_tempDevice.addItem(self.ui.comboBox_tempDevice.currentText())
diff --git a/sources/ptm/contents/code/dataengine.py b/sources/ptm/contents/code/dataengine.py
index 55f0b3d..52dbb65 100644
--- a/sources/ptm/contents/code/dataengine.py
+++ b/sources/ptm/contents/code/dataengine.py
@@ -91,8 +91,7 @@ class DataEngine:
def dataUpdated(self, sourceName, data):
"""function to update data"""
- if True:
- #try:
+ try:
if (sourceName == "system/uptime"):
value = datetime.timedelta(0, int(round(float(data[QString(u'value')]), 1)))
days = value.days
@@ -271,5 +270,5 @@ class DataEngine:
self.parent.label_time.setText(text)
self.parent.update()
- #except:
- #pass
+ except:
+ pass
diff --git a/sources/ptm/contents/ui/configwindow.ui b/sources/ptm/contents/ui/configwindow.ui
index e2fedc1..2ab2348 100644
--- a/sources/ptm/contents/ui/configwindow.ui
+++ b/sources/ptm/contents/ui/configwindow.ui
@@ -1081,9 +1081,6 @@ $ms - uptime minutes
Editable
del - remove item
-
- true
-
@@ -1139,9 +1136,6 @@ del - remove item
Editable
del - remove item
-
- true
-
@@ -1197,9 +1191,6 @@ del - remove item
Editable
del - remove item
-
- true
-