From 405dda5144f075d0fd427aee6827b2c57f4ec9fd Mon Sep 17 00:00:00 2001 From: arcan1s Date: Tue, 1 Apr 2014 09:59:44 +0400 Subject: [PATCH 1/5] start work on V.1.7.0 edited ui --- sources/ptm/contents/ui/configwindow.ui | 704 ++++++++++++++++++------ 1 file changed, 548 insertions(+), 156 deletions(-) diff --git a/sources/ptm/contents/ui/configwindow.ui b/sources/ptm/contents/ui/configwindow.ui index d9b73c2..c0a5449 100644 --- a/sources/ptm/contents/ui/configwindow.ui +++ b/sources/ptm/contents/ui/configwindow.ui @@ -7,7 +7,7 @@ 0 0 575 - 588 + 538 @@ -77,12 +77,7 @@ $isotime - time in ISO format $shorttime - time in short format $longtime - time in log format -$custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\o zero; - $MMMM - long month; $MMM - short month; $MM - month; $M - month w\o zero; - $yyyy - year; $yy short year; - $hh - hours (24 only); $h - hours w\o zero (24 only); - $mm - minutes; $m - minutes w\o zero; - $ss - seconds; $s - seconds w\o zero +$custom - custom time format Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -101,7 +96,7 @@ $custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\o zero; 1 - 14 + 15 1 @@ -138,7 +133,7 @@ $custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\o zero; $uptime - system uptime -$custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes +$custom - custom format Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -157,7 +152,7 @@ $custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes 1 - 14 + 15 1 @@ -197,7 +192,9 @@ $custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes $cpu - total load CPU, % -$ccpu - load CPU for each core, % +$cpu0 - load CPU for core 0, % +... +$cpu7 - load CPU for core 7, % Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -216,7 +213,7 @@ $ccpu - load CPU for each core, % 1 - 14 + 15 1 @@ -256,7 +253,9 @@ $ccpu - load CPU for each core, % $cpucl - average CPU clock, MHz -$ccpucl - CPU clock for each core, MHz +$cpucl0 - CPU clock for core 0, MHz +... +$cpucl7 - CPU clock for core 7, MHz Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -275,7 +274,7 @@ $ccpucl - CPU clock for each core, MHz 1 - 14 + 15 1 @@ -311,19 +310,6 @@ $ccpucl - CPU clock for each core, MHz - - - - - 150 - 16777215 - - - - true - - - @@ -346,7 +332,7 @@ $ccpucl - CPU clock for each core, MHz 1 - 14 + 15 1 @@ -404,7 +390,7 @@ $ccpucl - CPU clock for each core, MHz 1 - 14 + 15 1 @@ -462,7 +448,7 @@ $ccpucl - CPU clock for each core, MHz 1 - 14 + 15 1 @@ -521,7 +507,7 @@ $memmb - RAM usage, MB 1 - 14 + 15 1 @@ -580,7 +566,7 @@ $swapmb - swap usage, MB 1 - 14 + 15 1 @@ -619,7 +605,7 @@ $swapmb - swap usage, MB - @@/;@@ - mount point usage, % + $hddN - usage for mount point N, %. Example: $hdd0 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -638,7 +624,7 @@ $swapmb - swap usage, MB 1 - 14 + 15 1 @@ -677,7 +663,7 @@ $swapmb - swap usage, MB - @@/dev/sda@@ - physical temperature on /dev/sda + $hddtempN - physical temperature on device N. Example: $hddtemp0 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -696,7 +682,7 @@ $swapmb - swap usage, MB 1 - 14 + 15 1 @@ -736,8 +722,7 @@ $swapmb - swap usage, MB $net - network speed, down/up, KB/s -$netdev - current network device -@@eth0@@ - disable auto select device and set specified device +$netdev - current network device Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -756,7 +741,7 @@ $netdev - current network device 1 - 14 + 15 1 @@ -815,7 +800,7 @@ $ac - AC status 1 - 14 + 15 1 @@ -833,92 +818,6 @@ $ac - AC status - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 120 - 20 - - - - - - - - - 120 - 0 - - - - Battery device - - - - - - - "/sys/class/power_supply/BAT0/capacity" by default - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 120 - 20 - - - - - - - - - 120 - 0 - - - - AC device - - - - - - - "/sys/class/power_supply/AC/online" by default - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - @@ -937,31 +836,6 @@ $ac - AC status - - - - - 100 - 0 - - - - - amarok - - - - - mpd - - - - - qmmp - - - - @@ -988,7 +862,7 @@ $title - song title 1 - 14 + 15 1 @@ -1006,6 +880,64 @@ $title - song title + + + + + + + 120 + 0 + + + + Custom + + + true + + + + + + + $custom - get output from custom command + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 120 + 16777215 + + + + 1 + + + 15 + + + 1 + + + 15 + + + Qt::Horizontal + + + QSlider::TicksAbove + + + + + @@ -1021,6 +953,449 @@ $title - song title + + + Advanced + + + + + + + + + 120 + 0 + + + + Custom time format + + + + + + + $dddd - long weekday +$ddd - short weekday +$dd - day +$d - day w\o zero +$MMMM - long month +$MMM - short month +$MM - month +$M - month w\o zero +$yyyy - year +$yy - short year +$hh - hours (24 only) +$h - hours w\o zero (24 only) +$mm - minutes +$m - minutes w\o zero +$ss - seconds +$s - seconds w\o zero + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + 120 + 0 + + + + Custom uptime format + + + + + + + $ds - uptime days +$hs - uptime hours +$ms - uptime minutes + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + + + + + + + 120 + 0 + + + + Temperature devices + + + + + + + + 0 + 0 + + + + true + + + + + + + + 100 + 0 + + + + Add + + + + + + + + + Editable +del - remove item + + + true + + + + + + + + + + + + + + 120 + 0 + + + + Mount points + + + + + + + + 0 + 0 + + + + true + + + + + + + + 100 + 0 + + + + Add + + + + + + + + + Editable +del - remove item + + + true + + + + + + + + + + + + + + 120 + 0 + + + + HDD devices + + + + + + + + 0 + 0 + + + + true + + + + + + + + 100 + 0 + + + + Add + + + + + + + + + Editable +del - remove item + + + true + + + + + + + + + + + + 120 + 0 + + + + Network directory + + + + + + + "/sys/class/net" by default + + + + + + + + + + + + 120 + 0 + + + + Disable auto select device and set specified device + + + Set network device + + + + + + + + 0 + 0 + + + + true + + + + + + + + + + + + 120 + 0 + + + + Battery device + + + + + + + "/sys/class/power_supply/BAT0/capacity" by default + + + + + + + + + + + + 120 + 0 + + + + AC device + + + + + + + "/sys/class/power_supply/AC/online" by default + + + + + + + + + + + + 120 + 0 + + + + Music player + + + + + + + + 0 + 0 + + + + + 100 + 0 + + + + + amarok + + + + + mpd + + + + + qmmp + + + + + + + + + + + + + 120 + 0 + + + + Custom command + + + + + + + Command to run, example: +wget -qO- http://ifconfig.me/ip - get external IP + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + Appearance @@ -1362,7 +1737,6 @@ $title - song title lineEdit_cpuclock slider_cpuclock checkBox_temp - comboBox_temp lineEdit_temp slider_temp checkBox_gpu @@ -1389,12 +1763,30 @@ $title - song title checkBox_bat lineEdit_bat slider_bat - lineEdit_batdev - lineEdit_acdev checkBox_player - comboBox_player lineEdit_player slider_player + checkBox_custom + lineEdit_custom + slider_custom + lineEdit_timeFormat + lineEdit_uptimeFormat + comboBox_tempDevice + pushButton_tempDevice + listWidget_tempDevice + comboBox_mount + pushButton_mount + listWidget_mount + comboBox_hddDevice + pushButton_hddDevice + listWidget_hddDevice + lineEdit_netdir + checkBox_netdev + comboBox_netdev + lineEdit_batdev + lineEdit_acdev + comboBox_playerSelect + lineEdit_customCommand spinBox_interval fontComboBox spinBox_fontSize From decf714e74f5570fbff39dfbdee5a2b8583e6b58 Mon Sep 17 00:00:00 2001 From: arcan1s Date: Tue, 1 Apr 2014 22:39:32 +0400 Subject: [PATCH 2/5] commit before testing --- sources/ptm/contents/code/config.py | 32 +-- sources/ptm/contents/code/configdef.py | 173 ++++++++++------- sources/ptm/contents/code/configwindow.py | 122 +++++++----- sources/ptm/contents/code/dataengine.py | 155 ++++----------- sources/ptm/contents/code/main.py | 132 ++++++++++--- sources/ptm/contents/code/ptmnotify.py | 10 +- sources/ptm/contents/code/reinit.py | 227 +++++++--------------- sources/ptm/contents/code/util.py | 32 +-- sources/ptm/contents/ui/configwindow.ui | 15 +- 9 files changed, 449 insertions(+), 449 deletions(-) diff --git a/sources/ptm/contents/code/config.py b/sources/ptm/contents/code/config.py index 03ccc26..37fb1a7 100644 --- a/sources/ptm/contents/code/config.py +++ b/sources/ptm/contents/code/config.py @@ -1,20 +1,22 @@ # -*- coding: utf-8 -*- -# Copyright 2012 Alex Oleshkevich -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ +# Copyright 2012 Alex Oleshkevich # +# # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., # +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +############################################################################ from util import * diff --git a/sources/ptm/contents/code/configdef.py b/sources/ptm/contents/code/configdef.py index b733759..ce6ce43 100644 --- a/sources/ptm/contents/code/configdef.py +++ b/sources/ptm/contents/code/configdef.py @@ -17,6 +17,7 @@ # along with pytextmonitor. If not, see http://www.gnu.org/licenses/ # ############################################################################ +from PyQt4.QtCore import * from PyQt4.QtGui import * from PyKDE4.kdecore import * from PyKDE4.kdeui import * @@ -53,6 +54,32 @@ class ConfigDefinition: self.parent.font_weight = self.configpage.ui.spinBox_weight.value() settings.set('font_weight', self.parent.font_weight) + self.parent.custom_time = str(self.configpage.ui.lineEdit_timeFormat.text()) + settings.set('custom_time', self.parent.custom_time) + self.parent.custom_uptime = str(self.configpage.ui.lineEdit_uptimeFormat.text()) + settings.set('custom_uptime', self.parent.custom_uptime) + # temp and mount below + self.parent.hddNames = [] + self.parent.hdd = {} + for item in self.configpage.ui.listWidget_hddDevice.items(QMimeData()): + self.parent.hddNames.append(str(item.text())) + self.parent.hdd[str(item.text())] =" 0.0" + settings.set('hdd', '@@'.join(self.parent.hddNames)) + self.parent.netdir = str(self.configpage.ui.lineEdit_netdir.text()) + settings.set('netdir', self.parent.netdir) + self.parent.netdevBool = str(self.configpage.ui.checkBox_netdev.checkState()) + settings.set('netdevBool', self.parent.netdevBool) + self.parent.custom_netdev = str(self.configpage.ui.comboBox_netdev.currentText()) + settings.set('custom_netdev', self.parent.custom_netdev) + self.parent.battery_device = str(self.configpage.ui.lineEdit_batdev.text()) + settings.set('battery_device', self.parent.battery_device) + self.parent.ac_device = str(self.configpage.ui.lineEdit_acdev.text()) + settings.set('ac_device', self.parent.ac_device) + self.parent.player_name = self.configpage.ui.comboBox_playerSelect.currentIndex() + settings.set('player_name', self.parent.player_name) + self.parent.custom_command = str(self.configpage.ui.lineEdit_customCommand.text()) + settings.set('custom_command', self.parent.custom_command) + # disconnecting from source and clear layout if (self.parent.uptimeBool > 0): self.parent.systemmonitor.disconnectSource("system/uptime", self.parent) @@ -60,36 +87,27 @@ class ConfigDefinition: self.parent.layout.removeItem(self.parent.label_uptime) if (self.parent.cpuBool > 0): self.parent.systemmonitor.disconnectSource("cpu/system/TotalLoad", self.parent) - if (self.parent.cpuFormat.split('$ccpu')[0] != self.parent.cpuFormat): - self.parent.label_cpu.setText('') - self.parent.layout.removeItem(self.parent.label_cpu) - self.parent.label_cpu1.setText('') - self.parent.layout.removeItem(self.parent.label_cpu1) - for core in range(self.parent.numCores): - self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/TotalLoad", self.parent) - exec ("self.parent.label_coreCpu" + str(core) + ".setText('')") - exec ("self.parent.layout.removeItem(self.parent.label_coreCpu" + str(core) + ")") - else: - self.parent.label_cpu.setText('') - self.parent.layout.removeItem(self.parent.label_cpu) + for core in self.parent.cpuCore.keys(): + self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/TotalLoad", self.parent) + self.parent.label_cpu.setText('') + self.parent.layout.removeItem(self.parent.label_cpu) if (self.parent.cpuclockBool > 0): self.parent.systemmonitor.disconnectSource("cpu/system/AverageClock", self.parent) - if (self.parent.cpuclockFormat.split('$ccpu')[0] != self.parent.cpuclockFormat): - self.parent.label_cpuclock.setText('') - self.parent.layout.removeItem(self.parent.label_cpuclock) - self.parent.label_cpuclock1.setText('') - self.parent.layout.removeItem(self.parent.label_cpuclock1) - for core in range(self.parent.numCores): - self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/clock", self.parent) - exec ("self.parent.label_coreCpuclock" + str(core) + ".setText('')") - exec ("self.parent.layout.removeItem(self.parent.label_coreCpuclock" + str(core) + ")") - else: - self.parent.label_cpuclock.setText('') - self.parent.layout.removeItem(self.parent.label_cpuclock) + for core in self.parent.cpuClockCore.keys(): + self.parent.systemmonitor.disconnectSource("cpu/cpu"+str(core)+"/clock", self.parent) + self.parent.label_cpuclock.setText('') + self.parent.layout.removeItem(self.parent.label_cpuclock) if (self.parent.tempBool > 0): - self.parent.systemmonitor.disconnectSource(self.parent.tempdev, self.parent) + for item in self.parent.temp: + self.parent.systemmonitor.disconnectSource(item[0], self.parent) self.parent.label_temp.setText('') self.parent.layout.removeItem(self.parent.label_temp) + self.parent.tempNames = [] + self.parent.temp = {} + for item in self.configpage.ui.listWidget_tempDevice.items(QMimeData()): + self.parent.tempNames.append(str(item.text())) + self.parent.temp[str(item.text())] =" 0.0" + settings.set('temp_device', '@@'.join(self.parent.tempNames)) if (self.parent.gpuBool > 0): self.parent.extsysmon.disconnectSource("gpu", self.parent) self.parent.label_gpu.setText('') @@ -112,14 +130,16 @@ class ConfigDefinition: self.parent.label_swap.setText('') self.parent.layout.removeItem(self.parent.label_swap) if (self.parent.hddBool > 0): - for mount in self.parent.mountPoints: - self.parent.systemmonitor.disconnectSource("partitions" + mount + "/filllevel", self.parent) - exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + '.setText("")') - exec ("self.parent.layout.removeItem(self.parent.label_hdd_" + ''.join(mount.split('/')) + ")") - self.parent.label_hdd0.setText('') - self.parent.label_hdd1.setText('') - self.parent.layout.removeItem(self.parent.label_hdd0) - self.parent.layout.removeItem(self.parent.label_hdd1) + for item in self.parent.mount: + self.parent.systemmonitor.disconnectSource("partitions" + item[0] + "/filllevel", self.parent) + self.parent.label_hdd.setText('') + self.parent.layout.removeItem(self.parent.label_hdd) + self.parent.mountNames = [] + self.parent.mount = {} + for item in self.configpage.ui.listWidget_mount.items(QMimeData()): + self.parent.mountNames.append(str(item.text())) + self.parent.mount[str(item.text())] =" 0.0" + settings.set('mount', '@@'.join(self.parent.mountNames)) if (self.parent.hddtempBool > 0): self.parent.extsysmon.disconnectSource("hddtemp", self.parent) self.parent.label_hddtemp.setText('') @@ -127,10 +147,8 @@ class ConfigDefinition: if (self.parent.netBool > 0): self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/transmitter/data", self.parent) self.parent.systemmonitor.disconnectSource("network/interfaces/"+self.parent.netdev+"/receiver/data", self.parent) - self.parent.label_netDown.setText('') - self.parent.label_netUp.setText('') - self.parent.layout.removeItem(self.parent.label_netUp) - self.parent.layout.removeItem(self.parent.label_netDown) + self.parent.label_net.setText('') + self.parent.layout.removeItem(self.parent.label_net) if (self.parent.batBool > 0): self.parent.label_bat.setText('') self.parent.layout.removeItem(self.parent.label_bat) @@ -142,8 +160,11 @@ class ConfigDefinition: self.parent.timemon.disconnectSource("Local", self.parent) self.parent.label_time.setText('') self.parent.layout.removeItem(self.parent.label_time) + if (self.parent.customBool > 0): + self.parent.label_custom.setText('') + self.parent.layout.removeItem(self.parent.label_custom) - self.parent.label_order = "--------------" + self.parent.label_order = "---------------" for label in self.parent.dict_orders.keys(): exec ('self.parent.' + self.parent.dict_orders[label] + 'Bool = ' + str(self.configpage.checkboxes[self.parent.dict_orders[label]].checkState())) @@ -156,19 +177,7 @@ class ConfigDefinition: else: exec ('self.parent.' + self.parent.dict_orders[label] + 'Format = str(self.configpage.lineedits[self.parent.dict_orders[label]].text())') exec ('settings.set("' + self.parent.dict_orders[label] + 'Format", self.parent.' + self.parent.dict_orders[label] + 'Format)') - exec ('settings.set("' + self.parent.dict_orders[label] + 'Bool", self.parent.' + self.parent.dict_orders[label] + 'Bool)') - if (self.parent.dict_orders[label] == 'bat'): - self.parent.battery_device = str(self.configpage.ui.lineEdit_batdev.text()) - self.parent.ac_device = str(self.configpage.ui.lineEdit_acdev.text()) - settings.set('battery_device', self.parent.battery_device) - settings.set('ac_device', self.parent.ac_device) - elif (self.parent.dict_orders[label] == 'temp'): - self.parent.tempdev = str(self.configpage.ui.comboBox_temp.currentText()) - settings.set('temp_device', self.parent.tempdev) - elif (self.parent.dict_orders[label] == 'player'): - self.parent.player_name = self.configpage.ui.comboBox_player.currentIndex() - settings.set('player_name', self.parent.player_name) - + exec ('settings.set("' + self.parent.dict_orders[label] + 'Bool", self.parent.' + self.parent.dict_orders[label] + 'Bool)') self.parent.label_order = ''.join(self.parent.label_order.split('-')) settings.set('label_order', self.parent.label_order) @@ -191,6 +200,52 @@ class ConfigDefinition: else: self.configpage.ui.comboBox_style.setCurrentIndex(1) self.configpage.ui.spinBox_weight.setValue(settings.get('font_weight', 400).toInt()[0]) + + self.configpage.ui.lineEdit_timeFormat.setText(str(settings.get('custom_time', '$hh:$mm'))) + self.configpage.ui.lineEdit_uptimeFormat.setText(str(settings.get('custom_uptime', '$ds,$hs,$ms'))) + commandOut = commands.getoutput("sensors") + for item in commandOut.split("\n\n"): + for device in item.split("\n"): + if (device.find('\xc2\xb0C') > -1): + try: + tempdev = 'lmsensors/' + item.split("\n")[0] + '/' + '_'.join(device.split(":")[0].split()) + self.configpage.ui.comboBox_tempDevice.addItem(tempdev) + except: + pass + self.configpage.ui.listWidget_tempDevice.clear() + for item in str(settings.get('temp_device', '')).split('@@'): + if (len(item) > 0): + self.configpage.ui.listWidget_tempDevice.addItem(item) + commandOut = commands.getoutput("mount") + for item in commandOut.split("\n"): + try: + mount = item.split(' on ')[1].split(' type ')[0] + self.configpage.ui.comboBox_mount.addItem(mount) + except: + pass + self.configpage.ui.listWidget_mount.clear() + for item in str(settings.get('mount', '/')).split('@@'): + self.configpage.ui.listWidget_mount.addItem(item) + commandOut = commands.getoutput("find /dev -name '[hs]d[a-z]'") + for item in commandOut.split("\n"): + try: + self.configpage.ui.comboBox_hddDevice.addItem(item) + except: + pass + 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.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): + self.configpage.ui.comboBox_netdev.addItem(item) + index = self.configpage.ui.comboBox_netdev.findText(str(settings.get('custom_netdev', 'lo'))) + self.configpage.ui.comboBox_netdev.setCurrentIndex(index) + self.configpage.ui.lineEdit_batdev.setText(str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))) + self.configpage.ui.lineEdit_acdev.setText(str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))) + self.configpage.ui.comboBox_playerSelect.setCurrentIndex(settings.get('player_name', 0).toInt()[0]) + self.configpage.ui.lineEdit_customCommand.setText(str(settings.get('custom_command', 'wget -qO- http://ifconfig.me/ip'))) + for label in self.parent.dict_orders.keys(): exec ('bool = self.parent.' + self.parent.dict_orders[label] + 'Bool') self.configpage.checkboxes[self.parent.dict_orders[label]].setCheckState(bool) @@ -200,22 +255,6 @@ class ConfigDefinition: self.configpage.lineedits[self.parent.dict_orders[label]].setText(str(settings.get(self.parent.dict_orders[label] + 'NonFormat', self.parent.dict_defFormat[self.parent.dict_orders[label]]))) else: self.configpage.lineedits[self.parent.dict_orders[label]].setText(str(settings.get(self.parent.dict_orders[label] + 'Format', self.parent.dict_defFormat[self.parent.dict_orders[label]]))) - if (self.parent.dict_orders[label] == 'bat'): - self.configpage.ui.lineEdit_batdev.setText(str(settings.get('battery_device', '/sys/class/power_supply/BAT0/capacity'))) - self.configpage.ui.lineEdit_acdev.setText(str(settings.get('ac_device', '/sys/class/power_supply/AC/online'))) - elif (self.parent.dict_orders[label] == 'temp'): - self.configpage.ui.comboBox_temp.addItem(str(settings.get('temp_device', '')) self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp°C]')) self.parent.label_temp = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.tempFormat.split('$temp')[0] != self.parent.tempFormat): - line = self.parent.tempFormat.split('$temp')[0] + '----' + self.parent.tempFormat.split('$temp')[1] - else: - line = self.parent.tempFormat + line = self.parent.tempFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_temp.setText(text) self.parent.layout.addItem(self.parent.label_temp) elif (order == "3"): if (self.parent.memBool > 0): self.parent.memFormat = str(settings.get('memFormat', '[mem: $mem%]')) + self.parent.label_mem = NewPlasmaLabel(self.parent.applet, self.parent) if (self.parent.memFormat.split('$memmb')[0] != self.parent.memFormat): self.parent.memInMb = True - line = self.parent.memFormat.split('$memmb')[0] + '-----' + self.parent.memFormat.split('$memmb')[1] elif (self.parent.memFormat.split('$mem')[0] != self.parent.memFormat): self.parent.memInMb = False self.parent.mem_used = 0.0 self.parent.mem_free = 1.0 self.parent.mem_uf = 0.0 - line = self.parent.memFormat.split('$mem')[0] + '-----' + self.parent.memFormat.split('$mem')[1] - else: - line = self.parent.memFormat + line = self.parent.memFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_mem = NewPlasmaLabel(self.parent.applet, self.parent) self.parent.label_mem.setText(text) self.parent.layout.addItem(self.parent.label_mem) elif (order == "4"): if (self.parent.swapBool > 0): self.parent.swapFormat = str(settings.get('swapFormat', '[swap: $swap%]')) + self.parent.label_swap = NewPlasmaLabel(self.parent.applet, self.parent) if (self.parent.swapFormat.split('$swapmb')[0] != self.parent.swapFormat): self.parent.swapInMb = True - line = self.parent.swapFormat.split('$swapmb')[0] + '-----' + self.parent.swapFormat.split('$swapmb')[1] elif (self.parent.swapFormat.split('$swap')[0] != self.parent.swapFormat): self.parent.swapInMb = False self.parent.swap_free = 1.0 self.parent.swap_used = 0.0 - line = self.parent.swapFormat.split('$swap')[0] + '-----' + self.parent.swapFormat.split('$swap')[1] - else: - line = self.parent.swapFormat + line = self.parent.swapFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_swap = NewPlasmaLabel(self.parent.applet, self.parent) self.parent.label_swap.setText(text) self.parent.layout.addItem(self.parent.label_swap) elif (order == "5"): if (self.parent.netBool > 0): self.parent.netNonFormat = str(settings.get('netNonFormat', '[net: $netKB/s]')) - if (self.parent.netNonFormat.split('@@')[0] != self.parent.netNonFormat): - self.parent.netdev = self.parent.netNonFormat.split('@@')[1] - self.parent.netNonFormat = self.parent.netNonFormat.split('@@')[0] + self.parent.netNonFormat.split('@@')[2] + self.parent.label_net = NewPlasmaLabel(self.parent.applet, self.parent) + if (self.parent.netdevBool > 0): + self.parent.netdev = self.parent.custom_netdev else: self.parent.netdev = self.parent.setupNetdev() if (self.parent.netNonFormat.split('$netdev')[0] != self.parent.netNonFormat): self.parent.netFormat = self.parent.netNonFormat.split('$netdev')[0] + self.parent.netdev + self.parent.netNonFormat.split('$netdev')[1] else: self.parent.netFormat = self.parent.netNonFormat - self.parent.label_netDown = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat): - line = self.parent.netFormat.split('$net')[0] + '----' - else: - line = self.parent.netFormat + line = self.parent.netFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_netDown.setText(text) - self.parent.layout.addItem(self.parent.label_netDown) - self.parent.label_netUp = Plasma.Label(self.parent.applet) - if (self.parent.netFormat.split('$net')[0] != self.parent.netFormat): - line = '/----' + self.parent.netFormat.split('$net')[1] - else: - line = '' - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_netUp.setText(text) - self.parent.layout.addItem(self.parent.label_netUp) + self.parent.label_net.setText(text) + self.parent.layout.addItem(self.parent.label_net) elif (order == "6"): if (self.parent.batBool > 0): 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.ac_device = str(settings.get('ac_device', '/sys/class/power_supply/AC/online')) self.parent.label_bat = NewPlasmaLabel(self.parent.applet, self.parent) line = self.parent.batFormat - if (line.split('$ac')[0] != line): - line = line.split('$ac')[0] + '(-)' + line.split('$ac')[1] - if (line.split('$bat')[0] != line): - line = line.split('$bat')[0] + '---' + line.split('$bat')[1] text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_bat.setText(text) self.parent.layout.addItem(self.parent.label_bat) elif (order == "7"): if (self.parent.cpuclockBool > 0): self.parent.cpuclockFormat = str(settings.get('cpuclockFormat', '[mhz: $cpucl]')) - if (self.parent.cpuclockFormat.split('$ccpucl')[0] != self.parent.cpuclockFormat): - self.parent.label_cpuclock = NewPlasmaLabel(self.parent.applet, self.parent) - 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]): - line = self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[0].split('$cpucl')[1] - else: - line = self.parent.cpuclockFormat.split('$ccpucl')[0] - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_cpuclock.setText(text) - self.parent.layout.addItem(self.parent.label_cpuclock) - text = self.parent.formatLine.split('$LINE')[0] + "----" + self.parent.formatLine.split('$LINE')[1] - 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) + '.setText(text)') - exec ('self.parent.layout.addItem(self.parent.label_coreCpuclock' + str(core) + ')') - 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] + '----' + self.parent.cpuclockFormat.split('$ccpucl')[1].split('$cpucl')[1] - else: - line = self.parent.cpuclockFormat.split('$ccpucl')[1] - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_cpuclock1.setText(text) - self.parent.layout.addItem(self.parent.label_cpuclock1) - else: - self.parent.label_cpuclock = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.cpuclockFormat.split('$cpucl')[0] != self.parent.cpuclockFormat): - line = self.parent.cpuclockFormat.split('$cpucl')[0] + '----' + self.parent.cpuclockFormat.split('$cpucl')[1] - else: - line = self.parent.cpuclockFormat - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_cpuclock.setText(text) - self.parent.layout.addItem(self.parent.label_cpuclock) + self.parent.label_cpuclock = NewPlasmaLabel(self.parent.applet, self.parent) + line = self.parent.cpuclockFormat + text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] + self.parent.label_cpuclock.setText(text) + self.parent.layout.addItem(self.parent.label_cpuclock) elif (order == "8"): if (self.parent.uptimeBool > 0): self.parent.uptimeFormat = str(settings.get('uptimeFormat', '[uptime: $uptime]')) self.parent.label_uptime = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.uptimeFormat.split('$uptime')[0] != self.parent.uptimeFormat): - line = self.parent.uptimeFormat.split('$uptime')[0] + '---d--h--m' + self.parent.uptimeFormat.split('$uptime')[1] - else: - line = self.parent.uptimeFormat + line = self.parent.uptimeFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_uptime.setText(text) self.parent.layout.addItem(self.parent.label_uptime) @@ -240,10 +183,7 @@ class Reinit(): if (self.parent.gpuBool > 0): self.parent.gpuFormat = str(settings.get('gpuFormat', '[gpu: $gpu%]')) self.parent.label_gpu = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.gpuFormat.split('$gpu')[0] != self.parent.gpuFormat): - line = self.parent.gpuFormat.split('$gpu')[0] + '-----' + self.parent.gpuFormat.split('$gpu')[1] - else: - line = self.parent.gpuFormat + line = self.parent.gpuFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_gpu.setText(text) self.parent.layout.addItem(self.parent.label_gpu) @@ -251,65 +191,31 @@ class Reinit(): if (self.parent.gputempBool > 0): self.parent.gputempFormat = str(settings.get('gputempFormat', '[gpu temp: $gputemp°C]')) self.parent.label_gputemp = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.gputempFormat.split('$gputemp')[0] != self.parent.gputempFormat): - line = self.parent.gputempFormat.split('$gputemp')[0] + '----' + self.parent.gputempFormat.split('$gputemp')[1] - else: - line = self.parent.gputempFormat + line = self.parent.gputempFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_gputemp.setText(text) self.parent.layout.addItem(self.parent.label_gputemp) elif (order == "b"): if (self.parent.hddBool > 0): - self.parent.hddFormat = str(settings.get('hddFormat', '[hdd: @@/@@%]')) - if (self.parent.hddFormat.split('@@')[0] != self.parent.hddFormat): - self.parent.mountPoints = self.parent.hddFormat.split('@@')[1].split(';') - line = self.parent.hddFormat.split('@@')[0] - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_hdd0 = NewPlasmaLabel(self.parent.applet, self.parent) - self.parent.label_hdd0.setText(text) - self.parent.layout.addItem(self.parent.label_hdd0) - text = self.parent.formatLine.split('$LINE')[0] + "-----" + self.parent.formatLine.split('$LINE')[1] - for mount in self.parent.mountPoints: - exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + ' = Plasma.Label(self.parent.applet)') - exec ('self.parent.label_hdd_' + ''.join(mount.split('/')) + '.setText(text)') - exec ('self.parent.layout.addItem(self.parent.label_hdd_' + ''.join(mount.split('/')) + ')') - line = self.parent.hddFormat.split('@@')[2] - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_hdd1 = Plasma.Label(self.parent.applet) - self.parent.label_hdd1.setText(text) - self.parent.layout.addItem(self.parent.label_hdd1) - else: - line = self.parent.hddFormat - text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] - self.parent.label_hdd0.setText(text) - self.parent.layout.addItem(self.parent.label_hdd0) + self.parent.hddFormat = str(settings.get('hddFormat', '[hdd: $hdd0%]')) + self.parent.label_hdd = NewPlasmaLabel(self.parent.applet, self.parent) + line = self.parent.hddFormat + text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] + self.parent.label_hdd.setText(text) + self.parent.layout.addItem(self.parent.label_hdd) elif (order == "c"): 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: $hddtemp0°C]')) self.parent.label_hddtemp = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.hddtempFormat.split('@@')[0] != self.parent.hddtempFormat): - line = self.parent.hddtempFormat.split('@@')[0] + '----' + self.parent.hddtempFormat.split('@@')[2] - else: - line = self.parent.hddtempFormat + line = self.parent.hddtempFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_hddtemp.setText(text) self.parent.layout.addItem(self.parent.label_hddtemp) elif (order == "d"): if (self.parent.playerBool > 0): self.parent.playerFormat = str(settings.get('playerFormat', '[$artist - $title]')) - self.parent.player_name = settings.get('player_name', 0).toInt()[0] self.parent.label_player = NewPlasmaLabel(self.parent.applet, self.parent) line = self.parent.playerFormat - if (line.split('$album')[0] != line): - line = line.split('$album')[0] + 'N\\A' + line.split('$album')[1] - if (line.split('$artist')[0] != line): - line = line.split('$artist')[0] + 'N\\A' + line.split('$artist')[1] - if (line.split('$progress')[0] != line): - line = line.split('$progress')[0] + '00:00' + line.split('$progress')[1] - if (line.split('$title')[0] != line): - line = line.split('$title')[0] + 'N\\A' + line.split('$title')[1] - if (line.split('$time')[0] != line): - line = line.split('$time')[0] + '00:00' + line.split('$time')[1] text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_player.setText(text) self.parent.layout.addItem(self.parent.label_player) @@ -317,13 +223,18 @@ class Reinit(): if (self.parent.timeBool > 0): self.parent.timeFormat = str(settings.get('timeFormat', '[$time]')) self.parent.label_time = NewPlasmaLabel(self.parent.applet, self.parent) - if (self.parent.timeFormat.split('$time')[0] != self.parent.timeFormat): - line = self.parent.timeFormat.split('$time')[0] + '----------------------' + self.parent.timeFormat.split('$time')[1] - else: - line = self.parent.timeFormat + line = self.parent.timeFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] self.parent.label_time.setText(text) self.parent.layout.addItem(self.parent.label_time) + elif (order == "f"): + if (self.parent.customBool > 0): + self.parent.customFormat = str(settings.get('customFormat', '[$custom]')) + self.parent.label_custom = NewPlasmaLabel(self.parent.applet, self.parent) + line = self.parent.customFormat + text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] + self.parent.label_custom.setText(text) + self.parent.layout.addItem(self.parent.label_custom) if not confAccept: self.parent.layout.setContentsMargins(1, 1, 1, 1) self.parent.applet.setLayout(self.parent.layout) diff --git a/sources/ptm/contents/code/util.py b/sources/ptm/contents/code/util.py index 015af14..499e523 100644 --- a/sources/ptm/contents/code/util.py +++ b/sources/ptm/contents/code/util.py @@ -1,20 +1,22 @@ # -*- coding: utf-8 -*- -# Copyright 2012 Alex Oleshkevich -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ +# Copyright 2012 Alex Oleshkevich # +# # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with this program; if not, write to the Free Software Foundation, Inc., # +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # +############################################################################ from shutil import copyfile from PyKDE4.kdecore import * diff --git a/sources/ptm/contents/ui/configwindow.ui b/sources/ptm/contents/ui/configwindow.ui index c0a5449..e2fedc1 100644 --- a/sources/ptm/contents/ui/configwindow.ui +++ b/sources/ptm/contents/ui/configwindow.ui @@ -313,7 +313,7 @@ $cpucl7 - CPU clock for core 7, MHz - $temp - physical temperature on CPU + $tempN - physical temperature on device N (from 0). Example: $temp0 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -605,7 +605,7 @@ $swapmb - swap usage, MB - $hddN - usage for mount point N, %. Example: $hdd0 + $hddN - usage for mount point N (from 0), %. Example: $hdd0 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -663,7 +663,7 @@ $swapmb - swap usage, MB - $hddtempN - physical temperature on device N. Example: $hddtemp0 + $hddtempN - physical temperature on device N (from 0). Example: $hddtemp0 Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -721,7 +721,8 @@ $swapmb - swap usage, MB - $net - network speed, down/up, KB/s + $down - download speed, KB/s +$up - upload speed, KB/s $netdev - current network device @@ -1223,6 +1224,9 @@ del - remove item "/sys/class/net" by default + + + @@ -1247,6 +1251,9 @@ del - remove item + + false + 0 From c66b255e8bd320d74c33d1faf2484a085f75da1b Mon Sep 17 00:00:00 2001 From: arcan1s Date: Tue, 1 Apr 2014 23:35:31 +0400 Subject: [PATCH 3/5] fix bugs that were found --- sources/ptm/contents/code/configdef.py | 25 ++++++++++++++----------- sources/ptm/contents/code/dataengine.py | 2 +- sources/ptm/contents/code/main.py | 25 ++++++++++++++++++------- sources/ptm/contents/code/reinit.py | 4 ++-- 4 files changed, 35 insertions(+), 21 deletions(-) diff --git a/sources/ptm/contents/code/configdef.py b/sources/ptm/contents/code/configdef.py index ce6ce43..6ae91f9 100644 --- a/sources/ptm/contents/code/configdef.py +++ b/sources/ptm/contents/code/configdef.py @@ -61,9 +61,10 @@ class ConfigDefinition: # temp and mount below self.parent.hddNames = [] self.parent.hdd = {} - for item in self.configpage.ui.listWidget_hddDevice.items(QMimeData()): - self.parent.hddNames.append(str(item.text())) - self.parent.hdd[str(item.text())] =" 0.0" + for i in range(self.configpage.ui.listWidget_hddDevice.count()): + item = self.configpage.ui.listWidget_hddDevice.item(i).text() + self.parent.hddNames.append(str(item)) + self.parent.hdd[str(item)] =" 0.0" settings.set('hdd', '@@'.join(self.parent.hddNames)) self.parent.netdir = str(self.configpage.ui.lineEdit_netdir.text()) settings.set('netdir', self.parent.netdir) @@ -99,14 +100,15 @@ class ConfigDefinition: self.parent.layout.removeItem(self.parent.label_cpuclock) if (self.parent.tempBool > 0): for item in self.parent.temp: - self.parent.systemmonitor.disconnectSource(item[0], self.parent) + self.parent.systemmonitor.disconnectSource(item, self.parent) self.parent.label_temp.setText('') self.parent.layout.removeItem(self.parent.label_temp) self.parent.tempNames = [] self.parent.temp = {} - for item in self.configpage.ui.listWidget_tempDevice.items(QMimeData()): - self.parent.tempNames.append(str(item.text())) - self.parent.temp[str(item.text())] =" 0.0" + for i in range(self.configpage.ui.listWidget_tempDevice.count()): + item = self.configpage.ui.listWidget_tempDevice.item(i).text() + self.parent.tempNames.append(str(item)) + self.parent.temp[str(item)] =" 0.0" settings.set('temp_device', '@@'.join(self.parent.tempNames)) if (self.parent.gpuBool > 0): self.parent.extsysmon.disconnectSource("gpu", self.parent) @@ -131,14 +133,15 @@ class ConfigDefinition: self.parent.layout.removeItem(self.parent.label_swap) if (self.parent.hddBool > 0): for item in self.parent.mount: - self.parent.systemmonitor.disconnectSource("partitions" + item[0] + "/filllevel", self.parent) + self.parent.systemmonitor.disconnectSource("partitions" + item + "/filllevel", self.parent) self.parent.label_hdd.setText('') self.parent.layout.removeItem(self.parent.label_hdd) self.parent.mountNames = [] self.parent.mount = {} - for item in self.configpage.ui.listWidget_mount.items(QMimeData()): - self.parent.mountNames.append(str(item.text())) - self.parent.mount[str(item.text())] =" 0.0" + for i in range(self.configpage.ui.listWidget_mount.count()): + item = self.configpage.ui.listWidget_mount.item(i).text() + self.parent.mountNames.append(str(item)) + self.parent.mount[str(item)] =" 0.0" settings.set('mount', '@@'.join(self.parent.mountNames)) if (self.parent.hddtempBool > 0): self.parent.extsysmon.disconnectSource("hddtemp", self.parent) diff --git a/sources/ptm/contents/code/dataengine.py b/sources/ptm/contents/code/dataengine.py index 155ab69..55f0b3d 100644 --- a/sources/ptm/contents/code/dataengine.py +++ b/sources/ptm/contents/code/dataengine.py @@ -147,7 +147,7 @@ class DataEngine: self.parent.netFormat = self.parent.netNonFormat elif (str(sourceName).split('/')[0] == "lmsensors"): value = str(round(float(data[QString(u'value')]), 1)) - self.parent.temp[sourceName] = "%4s" % (value) + self.parent.temp[str(sourceName)] = "%4s" % (value) elif (str(sourceName).split('/')[0] == "partitions"): value = str(round(float(data[QString(u'value')]), 1)) self.parent.mount['/'+'/'.join(str(sourceName).split('/')[1:-1])] = "%5s" % (value) diff --git a/sources/ptm/contents/code/main.py b/sources/ptm/contents/code/main.py index acb3986..15759a6 100644 --- a/sources/ptm/contents/code/main.py +++ b/sources/ptm/contents/code/main.py @@ -133,8 +133,8 @@ class pyTextWidget(plasmascript.Applet): 'cpuclock':'[mhz: $cpucl]', 'custom':'[$custom]', 'gpu':'[gpu: $gpu%]', 'gputemp':'[gpu temp: $gputemp°C]', 'hdd':'[hdd: $hdd0%]', 'hddtemp':'[hdd temp: $hddtemp0°C]', 'mem':'[mem: $mem%]', - 'net':'[$netdev: $netKB/s]', 'swap':'[swap: $swap%]', - 'temp':'[temp: $temp°C]', 'uptime':'[uptime: $uptime]', + 'net':'[$netdev: $down/$upKB/s]', 'swap':'[swap: $swap%]', + 'temp':'[temp: $temp0°C]', 'uptime':'[uptime: $uptime]', 'player':'[$artist - $title]', 'time':'[$time]'} @@ -164,6 +164,8 @@ class pyTextWidget(plasmascript.Applet): self.cpuText() if (self.cpuclockBool > 0): self.cpuclockText() + if (self.customBool > 0): + self.getCustom() if (self.hddBool > 0): self.mountText() if ((self.memBool > 0) and (self.memInMb == False)): @@ -218,12 +220,12 @@ class pyTextWidget(plasmascript.Applet): def cpuclockText(self): """function to set cpu clock text""" line = self.cpuclockFormat - for core in self.cpuclockCore.keys(): + for core in self.cpuClockCore.keys(): if (core > -1): if (line.split('$cpucl'+str(core))[0] != line): - line = line.split('$cpucl'+str(core))[0] + self.cpuclockCore[core] + line.split('$cpucl'+str(core))[1] + line = line.split('$cpucl'+str(core))[0] + self.cpuClockCore[core] + line.split('$cpucl'+str(core))[1] if (line.split('$cpucl')[0] != line): - line = line.split('$cpucl')[0] + self.cpuclockCore[-1] + line.split('$cpucl')[1] + line = line.split('$cpucl')[0] + self.cpuClockCore[-1] + line.split('$cpucl')[1] text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1] self.label_cpuclock.setText(text) @@ -247,7 +249,7 @@ class pyTextWidget(plasmascript.Applet): def mountText(self): """function to set mount text""" line = self.hddFormat - for i in self.mountNames: + for i in range(len(self.mountNames)): if (line.split('$hdd'+str(i))[0] != line): line = line.split('$hdd'+str(i))[0] + self.mount[self.mountNames[i]] + line.split('$hdd'+str(i))[1] text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1] @@ -284,13 +286,22 @@ class pyTextWidget(plasmascript.Applet): def tempText(self): """function to set temperature text""" line = self.tempFormat - for i in self.tempNames: + for i in range(len(self.tempNames)): if (line.split('$temp'+str(i))[0] != line): line = line.split('$temp'+str(i))[0] + self.temp[self.tempNames[i]] + line.split('$temp'+str(i))[1] text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1] self.label_temp.setText(text) + def getCustom(self): + """function to get output from custom command""" + commandOut = commands.getoutput(self.custom_command) + line = self.customFormat + line = line.split('$custom')[0] + commandOut + line.split('$custom')[1] + text = self.formatLine.split('$LINE')[0] + line + self.formatLine.split('$LINE')[1] + self.label_custom.setText(text) + + @pyqtSignature("dataUpdated(const QString &, const Plasma::DataEngine::Data &)") def dataUpdated(self, sourceName, data): """function to update label""" diff --git a/sources/ptm/contents/code/reinit.py b/sources/ptm/contents/code/reinit.py index 3179135..1042bfa 100644 --- a/sources/ptm/contents/code/reinit.py +++ b/sources/ptm/contents/code/reinit.py @@ -104,7 +104,7 @@ class Reinit(): self.parent.layout.addItem(self.parent.label_cpu) elif (order == "2"): if (self.parent.tempBool > 0): - self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp°C]')) + self.parent.tempFormat = str(settings.get('tempFormat', '[temp: $temp0°C]')) self.parent.label_temp = NewPlasmaLabel(self.parent.applet, self.parent) line = self.parent.tempFormat text = self.parent.formatLine.split('$LINE')[0] + line + self.parent.formatLine.split('$LINE')[1] @@ -141,7 +141,7 @@ class Reinit(): self.parent.layout.addItem(self.parent.label_swap) elif (order == "5"): if (self.parent.netBool > 0): - self.parent.netNonFormat = str(settings.get('netNonFormat', '[net: $netKB/s]')) + self.parent.netNonFormat = str(settings.get('netNonFormat', '[net: $down/$upKB/s]')) self.parent.label_net = NewPlasmaLabel(self.parent.applet, self.parent) if (self.parent.netdevBool > 0): self.parent.netdev = self.parent.custom_netdev From a716269e79f1f7cb2afa560f529188cbb56a0a3e Mon Sep 17 00:00:00 2001 From: arcan1s Date: Tue, 1 Apr 2014 23:48:53 +0400 Subject: [PATCH 4/5] edited translations --- sources/CMakeLists.txt | 4 +- sources/ptm/po/en.po | 468 ++++++++++++++++++++---------- sources/ptm/po/pytextmonitor.pot | 397 +++++++++++++++++--------- sources/ptm/po/ru.po | 475 +++++++++++++++++++++---------- 4 files changed, 915 insertions(+), 429 deletions(-) diff --git a/sources/CMakeLists.txt b/sources/CMakeLists.txt index 29bcc06..84c8dee 100644 --- a/sources/CMakeLists.txt +++ b/sources/CMakeLists.txt @@ -7,8 +7,8 @@ cmake_policy (SET CMP0015 NEW) project (pytextmonitor) set (PROJECT_VERSION_MAJOR 1) -set (PROJECT_VERSION_MINOR 6) -set (PROJECT_VERSION_PATCH 1) +set (PROJECT_VERSION_MINOR 7) +set (PROJECT_VERSION_PATCH 0) set (PROJECT_VERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}) message (STATUS "Version: ${PROJECT_VERSION}") diff --git a/sources/ptm/po/en.po b/sources/ptm/po/en.po index 644dc8f..1a08963 100644 --- a/sources/ptm/po/en.po +++ b/sources/ptm/po/en.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=157124\n" -"POT-Creation-Date: 2014-03-31 00:58+0400\n" -"PO-Revision-Date: 2014-03-31 01:01+0400\n" +"POT-Creation-Date: 2014-04-01 23:36+0400\n" +"PO-Revision-Date: 2014-04-01 23:39+0400\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Russian \n" "Language: ru\n" @@ -46,7 +46,7 @@ msgstr "" msgid "Time" msgstr "Time" -#. i18n: file: ui/configwindow.ui:85 +#. i18n: file: ui/configwindow.ui:80 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_time) #: rc.cpp:15 msgid "" @@ -54,123 +54,117 @@ msgid "" "$isotime - time in ISO format\n" "$shorttime - time in short format\n" "$longtime - time in log format\n" -"$custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\\o " -"zero; \n" -"\t$MMMM - long month; $MMM - short month; $MM - month; $M - month w\\o " -"zero; \n" -"\t$yyyy - year; $yy short year; \n" -"\t$hh - hours (24 only); $h - hours w\\o zero (24 only); \n" -"\t$mm - minutes; $m - minutes w\\o zero;\n" -"\t$ss - seconds; $s - seconds w\\o zero" +"$custom - custom time format" msgstr "" "$time - time in default format\n" "$isotime - time in ISO format\n" "$shorttime - time in short format\n" "$longtime - time in log format\n" -"$custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\\o " -"zero; \n" -"\t$MMMM - long month; $MMM - short month; $MM - month; $M - month w\\o " -"zero; \n" -"\t$yyyy - year; $yy short year; \n" -"\t$hh - hours (24 only); $h - hours w\\o zero (24 only); \n" -"\t$mm - minutes; $m - minutes w\\o zero;\n" -"\t$ss - seconds; $s - seconds w\\o zero" +"$custom - custom time format" -#. i18n: file: ui/configwindow.ui:130 +#. i18n: file: ui/configwindow.ui:125 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_uptime) -#: rc.cpp:27 +#: rc.cpp:22 msgid "Uptime" msgstr "Uptime" -#. i18n: file: ui/configwindow.ui:141 +#. i18n: file: ui/configwindow.ui:136 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptime) -#: rc.cpp:30 +#: rc.cpp:25 msgid "" "$uptime - system uptime\n" -"$custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes" +"$custom - custom format" msgstr "" "$uptime - system uptime\n" -"$custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes" +"$custom - custom format" -#. i18n: file: ui/configwindow.ui:189 +#. i18n: file: ui/configwindow.ui:184 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpu) -#: rc.cpp:34 +#: rc.cpp:29 msgid "CPU" msgstr "CPU" -#. i18n: file: ui/configwindow.ui:200 +#. i18n: file: ui/configwindow.ui:197 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpu) -#: rc.cpp:38 +#: rc.cpp:33 #, no-c-format msgid "" "$cpu - total load CPU, %\n" -"$ccpu - load CPU for each core, %" +"$cpu0 - load CPU for core 0, %\n" +"...\n" +"$cpu7 - load CPU for core 7, %" msgstr "" "$cpu - total load CPU, %\n" -"$ccpu - load CPU for each core, %" +"$cpu0 - load CPU for core 0, %\n" +"...\n" +"$cpu7 - load CPU for core 7, %" -#. i18n: file: ui/configwindow.ui:248 +#. i18n: file: ui/configwindow.ui:245 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpuclock) -#: rc.cpp:42 +#: rc.cpp:39 msgid "CPU Clock" msgstr "CPU Clock" -#. i18n: file: ui/configwindow.ui:259 +#. i18n: file: ui/configwindow.ui:258 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpuclock) -#: rc.cpp:45 +#: rc.cpp:42 msgid "" "$cpucl - average CPU clock, MHz\n" -"$ccpucl - CPU clock for each core, MHz" +"$cpucl0 - CPU clock for core 0, MHz\n" +"...\n" +"$cpucl7 - CPU clock for core 7, MHz" msgstr "" "$cpucl - average CPU clock, MHz\n" -"$ccpucl - CPU clock for each core, MHz" +"$cpucl0 - CPU clock for core 0, MHz\n" +"...\n" +"$cpucl7 - CPU clock for core 7, MHz" -#. i18n: file: ui/configwindow.ui:307 +#. i18n: file: ui/configwindow.ui:306 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_temp) -#: rc.cpp:49 +#: rc.cpp:48 msgid "Temperature" msgstr "Temperature" -#. i18n: file: ui/configwindow.ui:330 +#. i18n: file: ui/configwindow.ui:316 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_temp) -#: rc.cpp:52 -msgid "$temp - physical temperature on CPU" -msgstr "$temp - physical temperature on CPU" +#: rc.cpp:51 +msgid "$tempN - physical temperature on device N (from 0). Example: $temp0" +msgstr "$tempN - physical temperature on device N (from 0). Example: $temp0" -#. i18n: file: ui/configwindow.ui:378 +#. i18n: file: ui/configwindow.ui:364 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpu) -#: rc.cpp:55 +#: rc.cpp:54 msgid "GPU" msgstr "GPU" -#. i18n: file: ui/configwindow.ui:388 +#. i18n: file: ui/configwindow.ui:374 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpu) -#: rc.cpp:59 +#: rc.cpp:58 #, no-c-format msgid "$gpu - gpu usage, %" msgstr "$gpu - gpu usage, %" -#. i18n: file: ui/configwindow.ui:436 +#. i18n: file: ui/configwindow.ui:422 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpuTemp) -#: rc.cpp:62 +#: rc.cpp:61 msgid "GPU Temp" msgstr "GPU Temp" -#. i18n: file: ui/configwindow.ui:446 +#. i18n: file: ui/configwindow.ui:432 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpuTemp) -#: rc.cpp:65 +#: rc.cpp:64 msgid "$gputemp - physical temperature on GPU" msgstr "$gputemp - physical temperature on GPU" -#. i18n: file: ui/configwindow.ui:494 +#. i18n: file: ui/configwindow.ui:480 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_mem) -#: rc.cpp:68 +#: rc.cpp:67 msgid "Memory" msgstr "Memory" -#. i18n: file: ui/configwindow.ui:505 +#. i18n: file: ui/configwindow.ui:491 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_mem) -#: rc.cpp:72 +#: rc.cpp:71 #, no-c-format msgid "" "$mem - RAM usage, %\n" @@ -179,15 +173,15 @@ msgstr "" "$mem - RAM usage, %\n" "$memmb - RAM usage, MB" -#. i18n: file: ui/configwindow.ui:553 +#. i18n: file: ui/configwindow.ui:539 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_swap) -#: rc.cpp:76 +#: rc.cpp:75 msgid "Swap" msgstr "Swap" -#. i18n: file: ui/configwindow.ui:564 +#. i18n: file: ui/configwindow.ui:550 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_swap) -#: rc.cpp:80 +#: rc.cpp:79 #, no-c-format msgid "" "$swap - swap usage, %\n" @@ -196,58 +190,60 @@ msgstr "" "$swap - swap usage, %\n" "$swapmb - swap usage, MB" -#. i18n: file: ui/configwindow.ui:612 +#. i18n: file: ui/configwindow.ui:598 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hdd) -#: rc.cpp:84 +#: rc.cpp:83 msgid "HDD" msgstr "HDD" -#. i18n: file: ui/configwindow.ui:622 +#. i18n: file: ui/configwindow.ui:608 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hdd) -#: rc.cpp:88 +#: rc.cpp:87 #, no-c-format -msgid "@@/;@@ - mount point usage, %" -msgstr "@@/;@@ - mount point usage, %" +msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0" +msgstr "$hddN - usage for mount point N (from 0), %. Example: $hdd0" -#. i18n: file: ui/configwindow.ui:670 +#. i18n: file: ui/configwindow.ui:656 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hddTemp) -#: rc.cpp:91 +#: rc.cpp:90 msgid "HDD Temp" msgstr "HDD Temp" -#. i18n: file: ui/configwindow.ui:680 +#. i18n: file: ui/configwindow.ui:666 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hddTemp) -#: rc.cpp:94 -msgid "@@/dev/sda@@ - physical temperature on /dev/sda" -msgstr "@@/dev/sda@@ - physical temperature on /dev/sda" +#: rc.cpp:93 +msgid "" +"$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" +msgstr "" +"$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" -#. i18n: file: ui/configwindow.ui:728 +#. i18n: file: ui/configwindow.ui:714 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_net) -#: rc.cpp:97 +#: rc.cpp:96 msgid "Network" msgstr "Network" -#. i18n: file: ui/configwindow.ui:740 +#. i18n: file: ui/configwindow.ui:726 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_net) -#: rc.cpp:100 +#: rc.cpp:99 msgid "" -"$net - network speed, down/up, KB/s\n" -"$netdev - current network device\n" -"@@eth0@@ - disable auto select device and set specified device" +"$down - download speed, KB/s\n" +"$up - upload speed, KB/s\n" +"$netdev - current network device" msgstr "" -"$net - network speed, down/up, KB/s\n" -"$netdev - current network device\n" -"@@eth0@@ - disable auto select device and set specified device" +"$down - download speed, KB/s\n" +"$up - upload speed, KB/s\n" +"$netdev - current network device" -#. i18n: file: ui/configwindow.ui:788 +#. i18n: file: ui/configwindow.ui:774 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_bat) -#: rc.cpp:105 +#: rc.cpp:104 msgid "Battery" msgstr "Battery" -#. i18n: file: ui/configwindow.ui:799 +#. i18n: file: ui/configwindow.ui:785 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_bat) -#: rc.cpp:109 +#: rc.cpp:108 #, no-c-format msgid "" "$bat - battery charge, %\n" @@ -256,57 +252,17 @@ msgstr "" "$bat - battery charge, %\n" "$ac - AC status" -#. i18n: file: ui/configwindow.ui:863 -#. i18n: ectx: property (text), widget (QLabel, label_batdev) -#: rc.cpp:113 -msgid "Battery device" -msgstr "Battery device" - -#. i18n: file: ui/configwindow.ui:870 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) -#: rc.cpp:116 -msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" -msgstr "\"/sys/class/power_supply/BAT0/capacity\" by default" - -#. i18n: file: ui/configwindow.ui:906 -#. i18n: ectx: property (text), widget (QLabel, label_acdev) -#: rc.cpp:119 -msgid "AC device" -msgstr "AC device" - -#. i18n: file: ui/configwindow.ui:913 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) -#: rc.cpp:122 -msgid "\"/sys/class/power_supply/AC/online\" by default" -msgstr "\"/sys/class/power_supply/AC/online\" by default" - -#. i18n: file: ui/configwindow.ui:933 +#. i18n: file: ui/configwindow.ui:833 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_player) -#: rc.cpp:125 +#. i18n: file: ui/configwindow.ui:1329 +#. i18n: ectx: property (text), widget (QLabel, label_playerSelect) +#: rc.cpp:112 rc.cpp:214 msgid "Music player" msgstr "Music player" -#. i18n: file: ui/configwindow.ui:950 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:128 -msgid "amarok" -msgstr "amarok" - -#. i18n: file: ui/configwindow.ui:955 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:131 -msgid "mpd" -msgstr "mpd" - -#. i18n: file: ui/configwindow.ui:960 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:134 -msgid "qmmp" -msgstr "qmmp" - -#. i18n: file: ui/configwindow.ui:972 +#. i18n: file: ui/configwindow.ui:847 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_player) -#: rc.cpp:137 +#: rc.cpp:115 msgid "" "$album - song album\n" "$artist - song artist\n" @@ -320,55 +276,273 @@ msgstr "" "$time - song duration\n" "$title - song title" -#. i18n: file: ui/configwindow.ui:1026 +#. i18n: file: ui/configwindow.ui:895 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_custom) +#: rc.cpp:122 +msgid "Custom" +msgstr "Custom" + +#. i18n: file: ui/configwindow.ui:905 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_custom) +#: rc.cpp:125 +msgid "$custom - get output from custom command" +msgstr "$custom - get output from custom command" + +#. i18n: file: ui/configwindow.ui:959 +#. i18n: ectx: attribute (title), widget (QWidget, advanced) +#: rc.cpp:128 +msgid "Advanced" +msgstr "Advanced" + +#. i18n: file: ui/configwindow.ui:973 +#. i18n: ectx: property (text), widget (QLabel, label_timeFormat) +#: rc.cpp:131 +msgid "Custom time format" +msgstr "Custom time format" + +#. i18n: file: ui/configwindow.ui:995 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_timeFormat) +#: rc.cpp:134 +msgid "" +"$dddd - long weekday\n" +"$ddd - short weekday\n" +"$dd - day\n" +"$d - day w\\o zero\n" +"$MMMM - long month\n" +"$MMM - short month\n" +"$MM - month\n" +"$M - month w\\o zero\n" +"$yyyy - year\n" +"$yy - short year\n" +"$hh - hours (24 only)\n" +"$h - hours w\\o zero (24 only)\n" +"$mm - minutes\n" +"$m - minutes w\\o zero\n" +"$ss - seconds\n" +"$s - seconds w\\o zero" +msgstr "" +"$dddd - long weekday\n" +"$ddd - short weekday\n" +"$dd - day\n" +"$d - day w\\o zero\n" +"$MMMM - long month\n" +"$MMM - short month\n" +"$MM - month\n" +"$M - month w\\o zero\n" +"$yyyy - year\n" +"$yy - short year\n" +"$hh - hours (24 only)\n" +"$h - hours w\\o zero (24 only)\n" +"$mm - minutes\n" +"$m - minutes w\\o zero\n" +"$ss - seconds\n" +"$s - seconds w\\o zero" + +#. i18n: file: ui/configwindow.ui:1015 +#. i18n: ectx: property (text), widget (QLabel, label_uptimeFormat) +#: rc.cpp:152 +msgid "Custom uptime format" +msgstr "Custom uptime format" + +#. i18n: file: ui/configwindow.ui:1024 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptimeFormat) +#: rc.cpp:155 +msgid "" +"$ds - uptime days\n" +"$hs - uptime hours\n" +"$ms - uptime minutes" +msgstr "" +"$ds - uptime days\n" +"$hs - uptime hours\n" +"$ms - uptime minutes" + +#. i18n: file: ui/configwindow.ui:1046 +#. i18n: ectx: property (text), widget (QLabel, label_tempDevice) +#: rc.cpp:160 +msgid "Temperature devices" +msgstr "Temperature devices" + +#. i18n: file: ui/configwindow.ui:1072 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_tempDevice) +#. i18n: file: ui/configwindow.ui:1130 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_mount) +#. i18n: file: ui/configwindow.ui:1188 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_hddDevice) +#: rc.cpp:163 rc.cpp:173 rc.cpp:183 +msgid "Add" +msgstr "Add" + +#. i18n: file: ui/configwindow.ui:1082 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_tempDevice) +#. i18n: file: ui/configwindow.ui:1140 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_mount) +#. i18n: file: ui/configwindow.ui:1198 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_hddDevice) +#: rc.cpp:166 rc.cpp:176 rc.cpp:186 +msgid "" +"Editable\n" +"del - remove item" +msgstr "" +"Editable\n" +"del - remove item" + +#. i18n: file: ui/configwindow.ui:1104 +#. i18n: ectx: property (text), widget (QLabel, label_mount) +#: rc.cpp:170 +msgid "Mount points" +msgstr "Mount points" + +#. i18n: file: ui/configwindow.ui:1162 +#. i18n: ectx: property (text), widget (QLabel, label_hddDevice) +#: rc.cpp:180 +msgid "HDD devices" +msgstr "HDD devices" + +#. i18n: file: ui/configwindow.ui:1218 +#. i18n: ectx: property (text), widget (QLabel, label_netdir) +#: rc.cpp:190 +msgid "Network directory" +msgstr "Network directory" + +#. i18n: file: ui/configwindow.ui:1225 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_netdir) +#: rc.cpp:193 +msgid "\"/sys/class/net\" by default" +msgstr "\"/sys/class/net\" by default" + +#. i18n: file: ui/configwindow.ui:1245 +#. i18n: ectx: property (toolTip), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:196 +msgid "Disable auto select device and set specified device" +msgstr "Disable auto select device and set specified device" + +#. i18n: file: ui/configwindow.ui:1248 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:199 +msgid "Set network device" +msgstr "Set network device" + +#. i18n: file: ui/configwindow.ui:1281 +#. i18n: ectx: property (text), widget (QLabel, label_batdev) +#: rc.cpp:202 +msgid "Battery device" +msgstr "Battery device" + +#. i18n: file: ui/configwindow.ui:1288 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) +#: rc.cpp:205 +msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" +msgstr "\"/sys/class/power_supply/BAT0/capacity\" by default" + +#. i18n: file: ui/configwindow.ui:1305 +#. i18n: ectx: property (text), widget (QLabel, label_acdev) +#: rc.cpp:208 +msgid "AC device" +msgstr "AC device" + +#. i18n: file: ui/configwindow.ui:1312 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) +#: rc.cpp:211 +msgid "\"/sys/class/power_supply/AC/online\" by default" +msgstr "\"/sys/class/power_supply/AC/online\" by default" + +#. i18n: file: ui/configwindow.ui:1349 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:217 +msgid "amarok" +msgstr "amarok" + +#. i18n: file: ui/configwindow.ui:1354 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:220 +msgid "mpd" +msgstr "mpd" + +#. i18n: file: ui/configwindow.ui:1359 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:223 +msgid "qmmp" +msgstr "qmmp" + +#. i18n: file: ui/configwindow.ui:1377 +#. i18n: ectx: property (text), widget (QLabel, label_customCommand) +#: rc.cpp:226 +msgid "Custom command" +msgstr "Custom command" + +#. i18n: file: ui/configwindow.ui:1385 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_customCommand) +#: rc.cpp:229 +msgid "" +"Command to run, example:\n" +"wget -qO- http://ifconfig.me/ip - get external IP" +msgstr "" +"Command to run, example:\n" +"wget -qO- http://ifconfig.me/ip - get external IP" + +#. i18n: file: ui/configwindow.ui:1408 #. i18n: ectx: attribute (title), widget (QWidget, appearance) -#: rc.cpp:144 +#: rc.cpp:233 msgid "Appearance" msgstr "Appearance" -#. i18n: file: ui/configwindow.ui:1040 +#. i18n: file: ui/configwindow.ui:1422 #. i18n: ectx: property (text), widget (QLabel, label_interval) -#: rc.cpp:147 +#: rc.cpp:236 msgid "Time interval" msgstr "Time interval" -#. i18n: file: ui/configwindow.ui:1095 +#. i18n: file: ui/configwindow.ui:1477 #. i18n: ectx: property (text), widget (QLabel, label_font) -#: rc.cpp:150 +#: rc.cpp:239 msgid "Font" msgstr "Font" -#. i18n: file: ui/configwindow.ui:1135 +#. i18n: file: ui/configwindow.ui:1517 #. i18n: ectx: property (text), widget (QLabel, label_fontSize) -#: rc.cpp:153 +#: rc.cpp:242 msgid "Font size" msgstr "Font size" -#. i18n: file: ui/configwindow.ui:1190 +#. i18n: file: ui/configwindow.ui:1572 #. i18n: ectx: property (text), widget (QLabel, label_color) -#: rc.cpp:156 +#: rc.cpp:245 msgid "Font color" msgstr "Font color" -#. i18n: file: ui/configwindow.ui:1230 +#. i18n: file: ui/configwindow.ui:1612 #. i18n: ectx: property (text), widget (QLabel, label_style) -#: rc.cpp:159 +#: rc.cpp:248 msgid "Font style" msgstr "Font style" -#. i18n: file: ui/configwindow.ui:1280 +#. i18n: file: ui/configwindow.ui:1662 #. i18n: ectx: property (text), widget (QLabel, label_weight) -#: rc.cpp:162 +#: rc.cpp:251 msgid "Font weight" msgstr "Font weight" -#: rc.cpp:163 +#: rc.cpp:252 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "Evgeniy Alekseev" -#: rc.cpp:164 +#: rc.cpp:253 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "esalexeev@gmail.com" +#~ msgid "@@/;@@ - mount point usage, %" +#~ msgstr "@@/;@@ - mount point usage, %" + +#~ msgid "@@/dev/sda@@ - physical temperature on /dev/sda" +#~ msgstr "@@/dev/sda@@ - physical temperature on /dev/sda" + +#~ msgid "" +#~ "$net - network speed, down/up, KB/s\n" +#~ "$netdev - current network device\n" +#~ "@@eth0@@ - disable auto select device and set specified device" +#~ msgstr "" +#~ "$net - network speed, down/up, KB/s\n" +#~ "$netdev - current network device\n" +#~ "@@eth0@@ - disable auto select device and set specified device" diff --git a/sources/ptm/po/pytextmonitor.pot b/sources/ptm/po/pytextmonitor.pot index 0fdd48d..de81b73 100644 --- a/sources/ptm/po/pytextmonitor.pot +++ b/sources/ptm/po/pytextmonitor.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=157124\n" -"POT-Creation-Date: 2014-03-31 00:58+0400\n" +"POT-Creation-Date: 2014-04-01 23:36+0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -43,7 +43,7 @@ msgstr "" msgid "Time" msgstr "" -#. i18n: file: ui/configwindow.ui:85 +#. i18n: file: ui/configwindow.ui:80 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_time) #: rc.cpp:15 msgid "" @@ -51,232 +51,190 @@ msgid "" "$isotime - time in ISO format\n" "$shorttime - time in short format\n" "$longtime - time in log format\n" -"$custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\\o " -"zero; \n" -"\t$MMMM - long month; $MMM - short month; $MM - month; $M - month w\\o " -"zero; \n" -"\t$yyyy - year; $yy short year; \n" -"\t$hh - hours (24 only); $h - hours w\\o zero (24 only); \n" -"\t$mm - minutes; $m - minutes w\\o zero;\n" -"\t$ss - seconds; $s - seconds w\\o zero" +"$custom - custom time format" msgstr "" -#. i18n: file: ui/configwindow.ui:130 +#. i18n: file: ui/configwindow.ui:125 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_uptime) -#: rc.cpp:27 +#: rc.cpp:22 msgid "Uptime" msgstr "" -#. i18n: file: ui/configwindow.ui:141 +#. i18n: file: ui/configwindow.ui:136 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptime) -#: rc.cpp:30 +#: rc.cpp:25 msgid "" "$uptime - system uptime\n" -"$custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes" +"$custom - custom format" msgstr "" -#. i18n: file: ui/configwindow.ui:189 +#. i18n: file: ui/configwindow.ui:184 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpu) -#: rc.cpp:34 +#: rc.cpp:29 msgid "CPU" msgstr "" -#. i18n: file: ui/configwindow.ui:200 +#. i18n: file: ui/configwindow.ui:197 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpu) -#: rc.cpp:38 +#: rc.cpp:33 #, no-c-format msgid "" "$cpu - total load CPU, %\n" -"$ccpu - load CPU for each core, %" +"$cpu0 - load CPU for core 0, %\n" +"...\n" +"$cpu7 - load CPU for core 7, %" msgstr "" -#. i18n: file: ui/configwindow.ui:248 +#. i18n: file: ui/configwindow.ui:245 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpuclock) -#: rc.cpp:42 +#: rc.cpp:39 msgid "CPU Clock" msgstr "" -#. i18n: file: ui/configwindow.ui:259 +#. i18n: file: ui/configwindow.ui:258 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpuclock) -#: rc.cpp:45 +#: rc.cpp:42 msgid "" "$cpucl - average CPU clock, MHz\n" -"$ccpucl - CPU clock for each core, MHz" +"$cpucl0 - CPU clock for core 0, MHz\n" +"...\n" +"$cpucl7 - CPU clock for core 7, MHz" msgstr "" -#. i18n: file: ui/configwindow.ui:307 +#. i18n: file: ui/configwindow.ui:306 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_temp) -#: rc.cpp:49 +#: rc.cpp:48 msgid "Temperature" msgstr "" -#. i18n: file: ui/configwindow.ui:330 +#. i18n: file: ui/configwindow.ui:316 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_temp) -#: rc.cpp:52 -msgid "$temp - physical temperature on CPU" +#: rc.cpp:51 +msgid "$tempN - physical temperature on device N (from 0). Example: $temp0" msgstr "" -#. i18n: file: ui/configwindow.ui:378 +#. i18n: file: ui/configwindow.ui:364 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpu) -#: rc.cpp:55 +#: rc.cpp:54 msgid "GPU" msgstr "" -#. i18n: file: ui/configwindow.ui:388 +#. i18n: file: ui/configwindow.ui:374 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpu) -#: rc.cpp:59 +#: rc.cpp:58 #, no-c-format msgid "$gpu - gpu usage, %" msgstr "" -#. i18n: file: ui/configwindow.ui:436 +#. i18n: file: ui/configwindow.ui:422 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpuTemp) -#: rc.cpp:62 +#: rc.cpp:61 msgid "GPU Temp" msgstr "" -#. i18n: file: ui/configwindow.ui:446 +#. i18n: file: ui/configwindow.ui:432 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpuTemp) -#: rc.cpp:65 +#: rc.cpp:64 msgid "$gputemp - physical temperature on GPU" msgstr "" -#. i18n: file: ui/configwindow.ui:494 +#. i18n: file: ui/configwindow.ui:480 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_mem) -#: rc.cpp:68 +#: rc.cpp:67 msgid "Memory" msgstr "" -#. i18n: file: ui/configwindow.ui:505 +#. i18n: file: ui/configwindow.ui:491 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_mem) -#: rc.cpp:72 +#: rc.cpp:71 #, no-c-format msgid "" "$mem - RAM usage, %\n" "$memmb - RAM usage, MB" msgstr "" -#. i18n: file: ui/configwindow.ui:553 +#. i18n: file: ui/configwindow.ui:539 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_swap) -#: rc.cpp:76 +#: rc.cpp:75 msgid "Swap" msgstr "" -#. i18n: file: ui/configwindow.ui:564 +#. i18n: file: ui/configwindow.ui:550 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_swap) -#: rc.cpp:80 +#: rc.cpp:79 #, no-c-format msgid "" "$swap - swap usage, %\n" "$swapmb - swap usage, MB" msgstr "" -#. i18n: file: ui/configwindow.ui:612 +#. i18n: file: ui/configwindow.ui:598 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hdd) -#: rc.cpp:84 +#: rc.cpp:83 msgid "HDD" msgstr "" -#. i18n: file: ui/configwindow.ui:622 +#. i18n: file: ui/configwindow.ui:608 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hdd) -#: rc.cpp:88 +#: rc.cpp:87 #, no-c-format -msgid "@@/;@@ - mount point usage, %" +msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0" msgstr "" -#. i18n: file: ui/configwindow.ui:670 +#. i18n: file: ui/configwindow.ui:656 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hddTemp) -#: rc.cpp:91 +#: rc.cpp:90 msgid "HDD Temp" msgstr "" -#. i18n: file: ui/configwindow.ui:680 +#. i18n: file: ui/configwindow.ui:666 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hddTemp) -#: rc.cpp:94 -msgid "@@/dev/sda@@ - physical temperature on /dev/sda" +#: rc.cpp:93 +msgid "" +"$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" msgstr "" -#. i18n: file: ui/configwindow.ui:728 +#. i18n: file: ui/configwindow.ui:714 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_net) -#: rc.cpp:97 +#: rc.cpp:96 msgid "Network" msgstr "" -#. i18n: file: ui/configwindow.ui:740 +#. i18n: file: ui/configwindow.ui:726 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_net) -#: rc.cpp:100 +#: rc.cpp:99 msgid "" -"$net - network speed, down/up, KB/s\n" -"$netdev - current network device\n" -"@@eth0@@ - disable auto select device and set specified device" +"$down - download speed, KB/s\n" +"$up - upload speed, KB/s\n" +"$netdev - current network device" msgstr "" -#. i18n: file: ui/configwindow.ui:788 +#. i18n: file: ui/configwindow.ui:774 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_bat) -#: rc.cpp:105 +#: rc.cpp:104 msgid "Battery" msgstr "" -#. i18n: file: ui/configwindow.ui:799 +#. i18n: file: ui/configwindow.ui:785 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_bat) -#: rc.cpp:109 +#: rc.cpp:108 #, no-c-format msgid "" "$bat - battery charge, %\n" "$ac - AC status" msgstr "" -#. i18n: file: ui/configwindow.ui:863 -#. i18n: ectx: property (text), widget (QLabel, label_batdev) -#: rc.cpp:113 -msgid "Battery device" -msgstr "" - -#. i18n: file: ui/configwindow.ui:870 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) -#: rc.cpp:116 -msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" -msgstr "" - -#. i18n: file: ui/configwindow.ui:906 -#. i18n: ectx: property (text), widget (QLabel, label_acdev) -#: rc.cpp:119 -msgid "AC device" -msgstr "" - -#. i18n: file: ui/configwindow.ui:913 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) -#: rc.cpp:122 -msgid "\"/sys/class/power_supply/AC/online\" by default" -msgstr "" - -#. i18n: file: ui/configwindow.ui:933 +#. i18n: file: ui/configwindow.ui:833 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_player) -#: rc.cpp:125 +#. i18n: file: ui/configwindow.ui:1329 +#. i18n: ectx: property (text), widget (QLabel, label_playerSelect) +#: rc.cpp:112 rc.cpp:214 msgid "Music player" msgstr "" -#. i18n: file: ui/configwindow.ui:950 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:128 -msgid "amarok" -msgstr "" - -#. i18n: file: ui/configwindow.ui:955 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:131 -msgid "mpd" -msgstr "" - -#. i18n: file: ui/configwindow.ui:960 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:134 -msgid "qmmp" -msgstr "" - -#. i18n: file: ui/configwindow.ui:972 +#. i18n: file: ui/configwindow.ui:847 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_player) -#: rc.cpp:137 +#: rc.cpp:115 msgid "" "$album - song album\n" "$artist - song artist\n" @@ -285,54 +243,235 @@ msgid "" "$title - song title" msgstr "" -#. i18n: file: ui/configwindow.ui:1026 +#. i18n: file: ui/configwindow.ui:895 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_custom) +#: rc.cpp:122 +msgid "Custom" +msgstr "" + +#. i18n: file: ui/configwindow.ui:905 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_custom) +#: rc.cpp:125 +msgid "$custom - get output from custom command" +msgstr "" + +#. i18n: file: ui/configwindow.ui:959 +#. i18n: ectx: attribute (title), widget (QWidget, advanced) +#: rc.cpp:128 +msgid "Advanced" +msgstr "" + +#. i18n: file: ui/configwindow.ui:973 +#. i18n: ectx: property (text), widget (QLabel, label_timeFormat) +#: rc.cpp:131 +msgid "Custom time format" +msgstr "" + +#. i18n: file: ui/configwindow.ui:995 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_timeFormat) +#: rc.cpp:134 +msgid "" +"$dddd - long weekday\n" +"$ddd - short weekday\n" +"$dd - day\n" +"$d - day w\\o zero\n" +"$MMMM - long month\n" +"$MMM - short month\n" +"$MM - month\n" +"$M - month w\\o zero\n" +"$yyyy - year\n" +"$yy - short year\n" +"$hh - hours (24 only)\n" +"$h - hours w\\o zero (24 only)\n" +"$mm - minutes\n" +"$m - minutes w\\o zero\n" +"$ss - seconds\n" +"$s - seconds w\\o zero" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1015 +#. i18n: ectx: property (text), widget (QLabel, label_uptimeFormat) +#: rc.cpp:152 +msgid "Custom uptime format" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1024 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptimeFormat) +#: rc.cpp:155 +msgid "" +"$ds - uptime days\n" +"$hs - uptime hours\n" +"$ms - uptime minutes" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1046 +#. i18n: ectx: property (text), widget (QLabel, label_tempDevice) +#: rc.cpp:160 +msgid "Temperature devices" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1072 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_tempDevice) +#. i18n: file: ui/configwindow.ui:1130 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_mount) +#. i18n: file: ui/configwindow.ui:1188 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_hddDevice) +#: rc.cpp:163 rc.cpp:173 rc.cpp:183 +msgid "Add" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1082 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_tempDevice) +#. i18n: file: ui/configwindow.ui:1140 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_mount) +#. i18n: file: ui/configwindow.ui:1198 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_hddDevice) +#: rc.cpp:166 rc.cpp:176 rc.cpp:186 +msgid "" +"Editable\n" +"del - remove item" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1104 +#. i18n: ectx: property (text), widget (QLabel, label_mount) +#: rc.cpp:170 +msgid "Mount points" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1162 +#. i18n: ectx: property (text), widget (QLabel, label_hddDevice) +#: rc.cpp:180 +msgid "HDD devices" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1218 +#. i18n: ectx: property (text), widget (QLabel, label_netdir) +#: rc.cpp:190 +msgid "Network directory" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1225 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_netdir) +#: rc.cpp:193 +msgid "\"/sys/class/net\" by default" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1245 +#. i18n: ectx: property (toolTip), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:196 +msgid "Disable auto select device and set specified device" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1248 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:199 +msgid "Set network device" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1281 +#. i18n: ectx: property (text), widget (QLabel, label_batdev) +#: rc.cpp:202 +msgid "Battery device" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1288 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) +#: rc.cpp:205 +msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1305 +#. i18n: ectx: property (text), widget (QLabel, label_acdev) +#: rc.cpp:208 +msgid "AC device" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1312 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) +#: rc.cpp:211 +msgid "\"/sys/class/power_supply/AC/online\" by default" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1349 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:217 +msgid "amarok" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1354 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:220 +msgid "mpd" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1359 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:223 +msgid "qmmp" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1377 +#. i18n: ectx: property (text), widget (QLabel, label_customCommand) +#: rc.cpp:226 +msgid "Custom command" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1385 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_customCommand) +#: rc.cpp:229 +msgid "" +"Command to run, example:\n" +"wget -qO- http://ifconfig.me/ip - get external IP" +msgstr "" + +#. i18n: file: ui/configwindow.ui:1408 #. i18n: ectx: attribute (title), widget (QWidget, appearance) -#: rc.cpp:144 +#: rc.cpp:233 msgid "Appearance" msgstr "" -#. i18n: file: ui/configwindow.ui:1040 +#. i18n: file: ui/configwindow.ui:1422 #. i18n: ectx: property (text), widget (QLabel, label_interval) -#: rc.cpp:147 +#: rc.cpp:236 msgid "Time interval" msgstr "" -#. i18n: file: ui/configwindow.ui:1095 +#. i18n: file: ui/configwindow.ui:1477 #. i18n: ectx: property (text), widget (QLabel, label_font) -#: rc.cpp:150 +#: rc.cpp:239 msgid "Font" msgstr "" -#. i18n: file: ui/configwindow.ui:1135 +#. i18n: file: ui/configwindow.ui:1517 #. i18n: ectx: property (text), widget (QLabel, label_fontSize) -#: rc.cpp:153 +#: rc.cpp:242 msgid "Font size" msgstr "" -#. i18n: file: ui/configwindow.ui:1190 +#. i18n: file: ui/configwindow.ui:1572 #. i18n: ectx: property (text), widget (QLabel, label_color) -#: rc.cpp:156 +#: rc.cpp:245 msgid "Font color" msgstr "" -#. i18n: file: ui/configwindow.ui:1230 +#. i18n: file: ui/configwindow.ui:1612 #. i18n: ectx: property (text), widget (QLabel, label_style) -#: rc.cpp:159 +#: rc.cpp:248 msgid "Font style" msgstr "" -#. i18n: file: ui/configwindow.ui:1280 +#. i18n: file: ui/configwindow.ui:1662 #. i18n: ectx: property (text), widget (QLabel, label_weight) -#: rc.cpp:162 +#: rc.cpp:251 msgid "Font weight" msgstr "" -#: rc.cpp:163 +#: rc.cpp:252 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "" -#: rc.cpp:164 +#: rc.cpp:253 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "" diff --git a/sources/ptm/po/ru.po b/sources/ptm/po/ru.po index ae73f85..a1c8406 100644 --- a/sources/ptm/po/ru.po +++ b/sources/ptm/po/ru.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: http://kde-look.org/content/show.php?content=157124\n" -"POT-Creation-Date: 2014-03-31 00:58+0400\n" -"PO-Revision-Date: 2014-03-31 01:22+0400\n" +"POT-Creation-Date: 2014-04-01 23:36+0400\n" +"PO-Revision-Date: 2014-04-01 23:48+0400\n" "Last-Translator: Evgeniy Alekseev \n" "Language-Team: Russian \n" "Language: ru\n" @@ -37,9 +37,8 @@ msgid "" "Detailed information may be found on project homepage" msgstr "" -"Подробная информация может быть найдена на домашней странице проекта" +"Подробная информация может быть найдена на домашней странице проекта" #. i18n: file: ui/configwindow.ui:66 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_time) @@ -47,7 +46,7 @@ msgstr "" msgid "Time" msgstr "Время" -#. i18n: file: ui/configwindow.ui:85 +#. i18n: file: ui/configwindow.ui:80 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_time) #: rc.cpp:15 msgid "" @@ -55,123 +54,117 @@ msgid "" "$isotime - time in ISO format\n" "$shorttime - time in short format\n" "$longtime - time in log format\n" -"$custom: $dddd - long weekday; $ddd - short weekday; $dd - day; $d day w\\o " -"zero; \n" -"\t$MMMM - long month; $MMM - short month; $MM - month; $M - month w\\o " -"zero; \n" -"\t$yyyy - year; $yy short year; \n" -"\t$hh - hours (24 only); $h - hours w\\o zero (24 only); \n" -"\t$mm - minutes; $m - minutes w\\o zero;\n" -"\t$ss - seconds; $s - seconds w\\o zero" +"$custom - custom time format" msgstr "" "$time - время в стандартном формате\n" -"$isotime - время ISO формате\n" +"$isotime - время в ISO формате\n" "$shorttime - время в коротком формате\n" "$longtime - время в длинном формате\n" -"$custom: $dddd - день недели (длинный); $ddd - день недели (короткий); $dd - " -"день; $d - день без 0; \n" -"\t$MMMM - месяц (длинный); $MMM - месяц (короткий); $MM - месяц; $M - месяц " -"без 0; \n" -"\t$yyyy - год; $yy - год (короткий); \n" -"\t$hh - часы (24); $h - часы без 0 (24); \n" -"\t$mm - минуты; $m - минуты без 0;\n" -"\t$ss - секунды; $s - секунды без 0" +"$custom - свой формат времени" -#. i18n: file: ui/configwindow.ui:130 +#. i18n: file: ui/configwindow.ui:125 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_uptime) -#: rc.cpp:27 +#: rc.cpp:22 msgid "Uptime" msgstr "Время работы" -#. i18n: file: ui/configwindow.ui:141 +#. i18n: file: ui/configwindow.ui:136 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptime) -#: rc.cpp:30 +#: rc.cpp:25 msgid "" "$uptime - system uptime\n" -"$custom: $ds - uptime days; $hs - uptime hours; $ms - uptime minutes" +"$custom - custom format" msgstr "" "$uptime - время работы\n" -"$custom: $ds - дни работы; $hs - часы; $ms - минуты" +"$custom - свой формат" -#. i18n: file: ui/configwindow.ui:189 +#. i18n: file: ui/configwindow.ui:184 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpu) -#: rc.cpp:34 +#: rc.cpp:29 msgid "CPU" msgstr "CPU" -#. i18n: file: ui/configwindow.ui:200 +#. i18n: file: ui/configwindow.ui:197 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpu) -#: rc.cpp:38 +#: rc.cpp:33 #, no-c-format msgid "" "$cpu - total load CPU, %\n" -"$ccpu - load CPU for each core, %" +"$cpu0 - load CPU for core 0, %\n" +"...\n" +"$cpu7 - load CPU for core 7, %" msgstr "" "$cpu - общая загрузка CPU, %\n" -"$ccpu - загрузка CPU для каждого ядра, %" +"$cpu0 - загрузка CPU для ядра 0, %\n" +"...\n" +"$cpu7 - загрузка CPU для ядра 7, %" -#. i18n: file: ui/configwindow.ui:248 +#. i18n: file: ui/configwindow.ui:245 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_cpuclock) -#: rc.cpp:42 +#: rc.cpp:39 msgid "CPU Clock" msgstr "Частота CPU" -#. i18n: file: ui/configwindow.ui:259 +#. i18n: file: ui/configwindow.ui:258 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_cpuclock) -#: rc.cpp:45 +#: rc.cpp:42 msgid "" "$cpucl - average CPU clock, MHz\n" -"$ccpucl - CPU clock for each core, MHz" +"$cpucl0 - CPU clock for core 0, MHz\n" +"...\n" +"$cpucl7 - CPU clock for core 7, MHz" msgstr "" "$cpucl - средняя частота CPU, MHz\n" -"$ccpucl - частота CPU для каждого ядра, MHz" +"$cpucl0 - частота CPU для ядра 0, MHz\n" +"...\n" +"$cpucl7 - частота CPU для ядра 7, MHz" -#. i18n: file: ui/configwindow.ui:307 +#. i18n: file: ui/configwindow.ui:306 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_temp) -#: rc.cpp:49 +#: rc.cpp:48 msgid "Temperature" msgstr "Температура" -#. i18n: file: ui/configwindow.ui:330 +#. i18n: file: ui/configwindow.ui:316 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_temp) -#: rc.cpp:52 -msgid "$temp - physical temperature on CPU" -msgstr "$temp - физическая температура на CPU" +#: rc.cpp:51 +msgid "$tempN - physical temperature on device N (from 0). Example: $temp0" +msgstr "$tempN - физическая температура на устройстве N (от 0). Пример: $temp0" -#. i18n: file: ui/configwindow.ui:378 +#. i18n: file: ui/configwindow.ui:364 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpu) -#: rc.cpp:55 +#: rc.cpp:54 msgid "GPU" msgstr "GPU" -#. i18n: file: ui/configwindow.ui:388 +#. i18n: file: ui/configwindow.ui:374 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpu) -#: rc.cpp:59 +#: rc.cpp:58 #, no-c-format msgid "$gpu - gpu usage, %" msgstr "$gpu - использование GPU, %" -#. i18n: file: ui/configwindow.ui:436 +#. i18n: file: ui/configwindow.ui:422 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_gpuTemp) -#: rc.cpp:62 +#: rc.cpp:61 msgid "GPU Temp" msgstr "Температура GPU" -#. i18n: file: ui/configwindow.ui:446 +#. i18n: file: ui/configwindow.ui:432 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_gpuTemp) -#: rc.cpp:65 +#: rc.cpp:64 msgid "$gputemp - physical temperature on GPU" msgstr "$gputemp - физическая температура на GPU" -#. i18n: file: ui/configwindow.ui:494 +#. i18n: file: ui/configwindow.ui:480 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_mem) -#: rc.cpp:68 +#: rc.cpp:67 msgid "Memory" msgstr "Память" -#. i18n: file: ui/configwindow.ui:505 +#. i18n: file: ui/configwindow.ui:491 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_mem) -#: rc.cpp:72 +#: rc.cpp:71 #, no-c-format msgid "" "$mem - RAM usage, %\n" @@ -180,15 +173,15 @@ msgstr "" "$mem - использование RAM, %\n" "$memmb - использование RAM, MB" -#. i18n: file: ui/configwindow.ui:553 +#. i18n: file: ui/configwindow.ui:539 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_swap) -#: rc.cpp:76 +#: rc.cpp:75 msgid "Swap" msgstr "Swap" -#. i18n: file: ui/configwindow.ui:564 +#. i18n: file: ui/configwindow.ui:550 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_swap) -#: rc.cpp:80 +#: rc.cpp:79 #, no-c-format msgid "" "$swap - swap usage, %\n" @@ -197,58 +190,61 @@ msgstr "" "$swap - использование swap, %\n" "$swapmb - использование swap, MB" -#. i18n: file: ui/configwindow.ui:612 +#. i18n: file: ui/configwindow.ui:598 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hdd) -#: rc.cpp:84 +#: rc.cpp:83 msgid "HDD" msgstr "HDD" -#. i18n: file: ui/configwindow.ui:622 +#. i18n: file: ui/configwindow.ui:608 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hdd) -#: rc.cpp:88 +#: rc.cpp:87 #, no-c-format -msgid "@@/;@@ - mount point usage, %" -msgstr "@@/;@@ - использование точки монтирования, %" +msgid "$hddN - usage for mount point N (from 0), %. Example: $hdd0" +msgstr "$hddN - использование точки монтирования N (от 0), %. Пример: $hdd0" -#. i18n: file: ui/configwindow.ui:670 +#. i18n: file: ui/configwindow.ui:656 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_hddTemp) -#: rc.cpp:91 +#: rc.cpp:90 msgid "HDD Temp" msgstr "Температура HDD" -#. i18n: file: ui/configwindow.ui:680 +#. i18n: file: ui/configwindow.ui:666 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_hddTemp) -#: rc.cpp:94 -msgid "@@/dev/sda@@ - physical temperature on /dev/sda" -msgstr "@@/dev/sda@@ - физическая температура /dev/sda" +#: rc.cpp:93 +msgid "" +"$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0" +msgstr "" +"$hddtempN - physical temperature on device N (from 0). Example: $hddtemp0 " +"$hddtempN - температура на устройстве N (от 0). Пример: $hddtemp0" -#. i18n: file: ui/configwindow.ui:728 +#. i18n: file: ui/configwindow.ui:714 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_net) -#: rc.cpp:97 +#: rc.cpp:96 msgid "Network" msgstr "Сеть" -#. i18n: file: ui/configwindow.ui:740 +#. i18n: file: ui/configwindow.ui:726 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_net) -#: rc.cpp:100 +#: rc.cpp:99 msgid "" -"$net - network speed, down/up, KB/s\n" -"$netdev - current network device\n" -"@@eth0@@ - disable auto select device and set specified device" +"$down - download speed, KB/s\n" +"$up - upload speed, KB/s\n" +"$netdev - current network device" msgstr "" -"$net - скорость передачи данных, down/up, KB/s\n" -"$netdev - используемое устройство\n" -"@@eth0@@ - отключить автовыбор устройства и установить указанное" +"$down - скорость скачки, KB/s\n" +"$up - скорость загрузки, KB/s\n" +"$netdev - текущее устройство" -#. i18n: file: ui/configwindow.ui:788 +#. i18n: file: ui/configwindow.ui:774 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_bat) -#: rc.cpp:105 +#: rc.cpp:104 msgid "Battery" msgstr "Батарея" -#. i18n: file: ui/configwindow.ui:799 +#. i18n: file: ui/configwindow.ui:785 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_bat) -#: rc.cpp:109 +#: rc.cpp:108 #, no-c-format msgid "" "$bat - battery charge, %\n" @@ -257,57 +253,17 @@ msgstr "" "$bat - заряд батареи, %\n" "$ac - статус адаптора питания" -#. i18n: file: ui/configwindow.ui:863 -#. i18n: ectx: property (text), widget (QLabel, label_batdev) -#: rc.cpp:113 -msgid "Battery device" -msgstr "Устройство батареи" - -#. i18n: file: ui/configwindow.ui:870 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) -#: rc.cpp:116 -msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" -msgstr "\"/sys/class/power_supply/BAT0/capacity\" по умолчанию" - -#. i18n: file: ui/configwindow.ui:906 -#. i18n: ectx: property (text), widget (QLabel, label_acdev) -#: rc.cpp:119 -msgid "AC device" -msgstr "Устройство AC" - -#. i18n: file: ui/configwindow.ui:913 -#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) -#: rc.cpp:122 -msgid "\"/sys/class/power_supply/AC/online\" by default" -msgstr "\"/sys/class/power_supply/AC/online\" по умолчанию" - -#. i18n: file: ui/configwindow.ui:933 +#. i18n: file: ui/configwindow.ui:833 #. i18n: ectx: property (text), widget (QCheckBox, checkBox_player) -#: rc.cpp:125 +#. i18n: file: ui/configwindow.ui:1329 +#. i18n: ectx: property (text), widget (QLabel, label_playerSelect) +#: rc.cpp:112 rc.cpp:214 msgid "Music player" msgstr "Музыкальный плеер" -#. i18n: file: ui/configwindow.ui:950 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:128 -msgid "amarok" -msgstr "amarok" - -#. i18n: file: ui/configwindow.ui:955 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:131 -msgid "mpd" -msgstr "mpd" - -#. i18n: file: ui/configwindow.ui:960 -#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_player) -#: rc.cpp:134 -msgid "qmmp" -msgstr "qmmp" - -#. i18n: file: ui/configwindow.ui:972 +#. i18n: file: ui/configwindow.ui:847 #. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_player) -#: rc.cpp:137 +#: rc.cpp:115 msgid "" "$album - song album\n" "$artist - song artist\n" @@ -321,56 +277,273 @@ msgstr "" "$time - продолжительность\n" "$title - название" -#. i18n: file: ui/configwindow.ui:1026 +#. i18n: file: ui/configwindow.ui:895 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_custom) +#: rc.cpp:122 +msgid "Custom" +msgstr "Своя команда" + +#. i18n: file: ui/configwindow.ui:905 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_custom) +#: rc.cpp:125 +msgid "$custom - get output from custom command" +msgstr "$custom - получить информацию из своей команды" + +#. i18n: file: ui/configwindow.ui:959 +#. i18n: ectx: attribute (title), widget (QWidget, advanced) +#: rc.cpp:128 +msgid "Advanced" +msgstr "Расширенные" + +#. i18n: file: ui/configwindow.ui:973 +#. i18n: ectx: property (text), widget (QLabel, label_timeFormat) +#: rc.cpp:131 +msgid "Custom time format" +msgstr "Свой формат времени" + +#. i18n: file: ui/configwindow.ui:995 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_timeFormat) +#: rc.cpp:134 +msgid "" +"$dddd - long weekday\n" +"$ddd - short weekday\n" +"$dd - day\n" +"$d - day w\\o zero\n" +"$MMMM - long month\n" +"$MMM - short month\n" +"$MM - month\n" +"$M - month w\\o zero\n" +"$yyyy - year\n" +"$yy - short year\n" +"$hh - hours (24 only)\n" +"$h - hours w\\o zero (24 only)\n" +"$mm - minutes\n" +"$m - minutes w\\o zero\n" +"$ss - seconds\n" +"$s - seconds w\\o zero" +msgstr "" +"$dddd - день недели (длинный)\n" +"$ddd - день недели (короткий)\n" +"$dd - день\n" +"$d - день без 0\n" +"$MMMM - месяц (длинный)\n" +"$MMM - месяц (короткий)\n" +"$MM - месяц\n" +"$M - месяц без 0\n" +"$yyyy - год\n" +"$yy - год (короткий)\n" +"$hh - часы (24)\n" +"$h - часы без 0 (24)\n" +"$mm - минуты\n" +"$m - минуты без 0\n" +"$ss - секунды\n" +"$s - секунды без 0" + +#. i18n: file: ui/configwindow.ui:1015 +#. i18n: ectx: property (text), widget (QLabel, label_uptimeFormat) +#: rc.cpp:152 +msgid "Custom uptime format" +msgstr "Свой формат аптайма" + +#. i18n: file: ui/configwindow.ui:1024 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_uptimeFormat) +#: rc.cpp:155 +msgid "" +"$ds - uptime days\n" +"$hs - uptime hours\n" +"$ms - uptime minutes" +msgstr "" +"$ds - дни работы\n" +"$hs - часы\n" +"$ms - минуты" + +#. i18n: file: ui/configwindow.ui:1046 +#. i18n: ectx: property (text), widget (QLabel, label_tempDevice) +#: rc.cpp:160 +msgid "Temperature devices" +msgstr "Температурные устройства" + +#. i18n: file: ui/configwindow.ui:1072 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_tempDevice) +#. i18n: file: ui/configwindow.ui:1130 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_mount) +#. i18n: file: ui/configwindow.ui:1188 +#. i18n: ectx: property (text), widget (QPushButton, pushButton_hddDevice) +#: rc.cpp:163 rc.cpp:173 rc.cpp:183 +msgid "Add" +msgstr "Добавить" + +#. i18n: file: ui/configwindow.ui:1082 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_tempDevice) +#. i18n: file: ui/configwindow.ui:1140 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_mount) +#. i18n: file: ui/configwindow.ui:1198 +#. i18n: ectx: property (toolTip), widget (QListWidget, listWidget_hddDevice) +#: rc.cpp:166 rc.cpp:176 rc.cpp:186 +msgid "" +"Editable\n" +"del - remove item" +msgstr "" +"Редактируемо\n" +"del - удалить строку" + +#. i18n: file: ui/configwindow.ui:1104 +#. i18n: ectx: property (text), widget (QLabel, label_mount) +#: rc.cpp:170 +msgid "Mount points" +msgstr "Точки монтирования" + +#. i18n: file: ui/configwindow.ui:1162 +#. i18n: ectx: property (text), widget (QLabel, label_hddDevice) +#: rc.cpp:180 +msgid "HDD devices" +msgstr "HDD" + +#. i18n: file: ui/configwindow.ui:1218 +#. i18n: ectx: property (text), widget (QLabel, label_netdir) +#: rc.cpp:190 +msgid "Network directory" +msgstr "Путь к интерфейсам" + +#. i18n: file: ui/configwindow.ui:1225 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_netdir) +#: rc.cpp:193 +msgid "\"/sys/class/net\" by default" +msgstr "\"/sys/class/net\" по умолчанию" + +#. i18n: file: ui/configwindow.ui:1245 +#. i18n: ectx: property (toolTip), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:196 +msgid "Disable auto select device and set specified device" +msgstr "Отключить авто выбор устройства и использовать указанное" + +#. i18n: file: ui/configwindow.ui:1248 +#. i18n: ectx: property (text), widget (QCheckBox, checkBox_netdev) +#: rc.cpp:199 +msgid "Set network device" +msgstr "Выберете сетевое устройство" + +#. i18n: file: ui/configwindow.ui:1281 +#. i18n: ectx: property (text), widget (QLabel, label_batdev) +#: rc.cpp:202 +msgid "Battery device" +msgstr "Устройство батареи" + +#. i18n: file: ui/configwindow.ui:1288 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_batdev) +#: rc.cpp:205 +msgid "\"/sys/class/power_supply/BAT0/capacity\" by default" +msgstr "\"/sys/class/power_supply/BAT0/capacity\" по умолчанию" + +#. i18n: file: ui/configwindow.ui:1305 +#. i18n: ectx: property (text), widget (QLabel, label_acdev) +#: rc.cpp:208 +msgid "AC device" +msgstr "Устройство AC" + +#. i18n: file: ui/configwindow.ui:1312 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_acdev) +#: rc.cpp:211 +msgid "\"/sys/class/power_supply/AC/online\" by default" +msgstr "\"/sys/class/power_supply/AC/online\" по умолчанию" + +#. i18n: file: ui/configwindow.ui:1349 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:217 +msgid "amarok" +msgstr "amarok" + +#. i18n: file: ui/configwindow.ui:1354 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:220 +msgid "mpd" +msgstr "mpd" + +#. i18n: file: ui/configwindow.ui:1359 +#. i18n: ectx: property (text), item, widget (QComboBox, comboBox_playerSelect) +#: rc.cpp:223 +msgid "qmmp" +msgstr "qmmp" + +#. i18n: file: ui/configwindow.ui:1377 +#. i18n: ectx: property (text), widget (QLabel, label_customCommand) +#: rc.cpp:226 +msgid "Custom command" +msgstr "Своя команда" + +#. i18n: file: ui/configwindow.ui:1385 +#. i18n: ectx: property (toolTip), widget (QLineEdit, lineEdit_customCommand) +#: rc.cpp:229 +msgid "" +"Command to run, example:\n" +"wget -qO- http://ifconfig.me/ip - get external IP" +msgstr "" +"Команда для запуска, например:\n" +"wget -qO- http://ifconfig.me/ip - получить внешний IP" + +#. i18n: file: ui/configwindow.ui:1408 #. i18n: ectx: attribute (title), widget (QWidget, appearance) -#: rc.cpp:144 +#: rc.cpp:233 msgid "Appearance" msgstr "Внешний вид" -#. i18n: file: ui/configwindow.ui:1040 +#. i18n: file: ui/configwindow.ui:1422 #. i18n: ectx: property (text), widget (QLabel, label_interval) -#: rc.cpp:147 +#: rc.cpp:236 msgid "Time interval" msgstr "Интервал обновления" -#. i18n: file: ui/configwindow.ui:1095 +#. i18n: file: ui/configwindow.ui:1477 #. i18n: ectx: property (text), widget (QLabel, label_font) -#: rc.cpp:150 +#: rc.cpp:239 msgid "Font" msgstr "Шрифт" -#. i18n: file: ui/configwindow.ui:1135 +#. i18n: file: ui/configwindow.ui:1517 #. i18n: ectx: property (text), widget (QLabel, label_fontSize) -#: rc.cpp:153 +#: rc.cpp:242 msgid "Font size" msgstr "Размер шрифта" -#. i18n: file: ui/configwindow.ui:1190 +#. i18n: file: ui/configwindow.ui:1572 #. i18n: ectx: property (text), widget (QLabel, label_color) -#: rc.cpp:156 +#: rc.cpp:245 msgid "Font color" msgstr "Цвет шрифта" -#. i18n: file: ui/configwindow.ui:1230 +#. i18n: file: ui/configwindow.ui:1612 #. i18n: ectx: property (text), widget (QLabel, label_style) -#: rc.cpp:159 +#: rc.cpp:248 msgid "Font style" msgstr "Стиль шрифта" -#. i18n: file: ui/configwindow.ui:1280 +#. i18n: file: ui/configwindow.ui:1662 #. i18n: ectx: property (text), widget (QLabel, label_weight) -#: rc.cpp:162 +#: rc.cpp:251 msgid "Font weight" msgstr "Ширина шрифта" -#: rc.cpp:163 +#: rc.cpp:252 msgctxt "NAME OF TRANSLATORS" msgid "Your names" msgstr "Evgeniy Alekseev" -#: rc.cpp:164 +#: rc.cpp:253 msgctxt "EMAIL OF TRANSLATORS" msgid "Your emails" msgstr "esalexeev@gmail.com" +#~ msgid "@@/;@@ - mount point usage, %" +#~ msgstr "@@/;@@ - использование точки монтирования, %" +#~ msgid "@@/dev/sda@@ - physical temperature on /dev/sda" +#~ msgstr "@@/dev/sda@@ - физическая температура /dev/sda" + +#~ msgid "" +#~ "$net - network speed, down/up, KB/s\n" +#~ "$netdev - current network device\n" +#~ "@@eth0@@ - disable auto select device and set specified device" +#~ msgstr "" +#~ "$net - скорость передачи данных, down/up, KB/s\n" +#~ "$netdev - используемое устройство\n" +#~ "@@eth0@@ - отключить автовыбор устройства и установить указанное" From 363c4327ee0d65656cc2c1097ff9d04d0627f42a Mon Sep 17 00:00:00 2001 From: arcan1s Date: Wed, 2 Apr 2014 00:35:47 +0400 Subject: [PATCH 5/5] commit before merging --- CHANGELOG | 9 +++ README.md | 87 +++++++++++++++-------- sources/ptm/contents/code/configwindow.py | 9 +++ sources/ptm/contents/code/dataengine.py | 7 +- sources/ptm/contents/ui/configwindow.ui | 9 --- 5 files changed, 77 insertions(+), 44 deletions(-) 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 -