commit before merging

This commit is contained in:
arcan1s 2014-04-02 00:35:47 +04:00
parent a716269e79
commit 363c4327ee
5 changed files with 77 additions and 44 deletions

View File

@ -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: Ver.1.6.1:
+ added support of several devices in hddtemp label + added support of several devices in hddtemp label
- fixed #6 - fixed #6

View File

@ -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 `$isotime` - time in iso format
* label `$shorttime` - time in short locale format * label `$shorttime` - time in short locale format
* label `$longtime` - time in long locale format * label `$longtime` - time in long locale format
* label `$custom` - will enable custom time format * label `$custom` - 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 `$uptime` - uptime, <i>---d--h--m</i> * label `$uptime` - uptime, <i>---d--h--m</i>
* label `$custom` - will enable custom uptime format * label `$custom` - 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 `$cpu` - total load cpu, <i>%</i> * label `$cpu` - total load cpu, <i>%</i>
* label `$ccpu` - load CPU for each core, <i>%</i> * label `$cpuN` - load CPU for core N, <i>%</i>. N should be in range 0 to 8
* label `$cpucl` - average cpu clock, <i>MHz</i> * label `$cpucl` - average cpu clock, <i>MHz</i>
* label `$ccpucl` - cpu clock for each core, <i>MHz</i> * label `$cpuclN` - cpu clock for core N, <i>MHz</i>. N should be in range 0 to 8
* label `$temp` - average temperature in system * label `$tempN` - temperature for device N. For example, `$temp0`
* label `$gpu` - GPU usage, <i>%</i>. `aticonfig` or `nvidia-smi` must be installed * label `$gpu` - GPU usage, <i>%</i>. `aticonfig` or `nvidia-smi` must be installed
* label `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed * label `$gputemp` - GPU temperature. `aticonfig` or `nvidia-smi` must be installed
* label `$mem` - usage memory, <i>%</i> * label `$mem` - usage memory, <i>%</i>
* label `$memmb` - usage memory, <i>MB</i> * label `$memmb` - usage memory, <i>MB</i>
* label `$swap` - swap, <i>%</i> * label `$swap` - swap, <i>%</i>
* label `$swapmb` - swap, <i>MB</i> * label `$swapmb` - swap, <i>MB</i>
* label `@@/@@` (in hdd label) - mount point (`/` in example) usage, <i>%</i>. Separator for mount points list is `;`, for example `@@/;/home;/mnt/global@@` * label `$hddN` - usage for mount point N, <i>%</i>. For example, `$hdd0`
* 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 `$hddtempN` - temperature for HDD N. For example, `$hddtemp0`
* label `$net` - download and upload speed, <i>KB/s</i>. You may specify network device: something like `@@eth0@@` * label `$down` - download speed, <i>KB/s</i>
* label `$up` - upload speed, <i>KB/s</i>
* label `$netdev` - current network device * label `$netdev` - current network device
* label `$bat` - battery charge, <i>%</i>. Battery device may be set below. File (`/sys/class/power_supply/BAT0/capacity` by default) must contain only battery charge in percent * label `$bat` - battery charge, <i>%</i>
* label `$ac` - status AC device. Return <i>(*)</i> if AC device is online or <i>( )</i> 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 `$ac` - status AC device. Return <i>(*)</i> if AC device is online or <i>( )</i> if offline
* label `$artist` - current song artist. One of supported music players must be installed
* label `$album` - current song album. One of supported music players must be installed * 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 `$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 `$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 `$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. 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. <b>$cpu will work only in cpu label</b>. **NOTE** you don't may set to show $cpu in swap label for example. <b>$cpu will work only in cpu label</b>.
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 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. 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 * kdebase-workspace
* kdebindings-python2 * kdebindings-python2
* lm_sensors (for definition temperature device) * lm_sensors (for definition temperature device)
* net-tools (for definition network device)
* sysstat (for notification) * sysstat (for notification)
Optional dependencies Optional dependencies

View File

@ -85,16 +85,25 @@ class ConfigWindow(QWidget):
def addHddDevice(self): def addHddDevice(self):
"""function to add mount points""" """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()) self.ui.listWidget_hddDevice.addItem(self.ui.comboBox_hddDevice.currentText())
def addMount(self): def addMount(self):
"""function to add mount points""" """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()) self.ui.listWidget_mount.addItem(self.ui.comboBox_mount.currentText())
def addTempDevice(self): def addTempDevice(self):
"""function to add temperature device""" """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()) self.ui.listWidget_tempDevice.addItem(self.ui.comboBox_tempDevice.currentText())

View File

@ -91,8 +91,7 @@ class DataEngine:
def dataUpdated(self, sourceName, data): def dataUpdated(self, sourceName, data):
"""function to update data""" """function to update data"""
if True: try:
#try:
if (sourceName == "system/uptime"): if (sourceName == "system/uptime"):
value = datetime.timedelta(0, int(round(float(data[QString(u'value')]), 1))) value = datetime.timedelta(0, int(round(float(data[QString(u'value')]), 1)))
days = value.days days = value.days
@ -271,5 +270,5 @@ class DataEngine:
self.parent.label_time.setText(text) self.parent.label_time.setText(text)
self.parent.update() self.parent.update()
#except: except:
#pass pass

View File

@ -1081,9 +1081,6 @@ $ms - uptime minutes</string>
<string>Editable <string>Editable
del - remove item</string> del - remove item</string>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -1139,9 +1136,6 @@ del - remove item</string>
<string>Editable <string>Editable
del - remove item</string> del - remove item</string>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -1197,9 +1191,6 @@ del - remove item</string>
<string>Editable <string>Editable
del - remove item</string> del - remove item</string>
</property> </property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>