From 99049164bec6cc3e97d4d75208d74621aa0a91be Mon Sep 17 00:00:00 2001 From: arcan1s Date: Fri, 12 Sep 2014 00:03:18 +0400 Subject: [PATCH] fix cpu* tags fix notifiations --- AUTHORS | 1 + CHANGELOG | 3 +++ CHANGELOG-RU | 3 +++ aticonfig-output | 12 ++++++++++++ sources/awesome-widget/customlabel.cpp | 15 --------------- sources/awesome-widget/deinteraction.cpp | 6 +++--- 6 files changed, 22 insertions(+), 18 deletions(-) create mode 100644 aticonfig-output diff --git a/AUTHORS b/AUTHORS index ccb9b86..1133c76 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,3 +6,4 @@ Translators: Ernesto Avilés Vzqz (Spanish translation) @underr (Brazillian Portuguese translation) Виктор Слободян (Ukrainian translation) +Steve Lemuel (Chinese translation) diff --git a/CHANGELOG b/CHANGELOG index 5cb3576..ea27702 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Ver.2.0.2: + add $fan* tags ++ add Chinese translation (thanks to @Lemueler) +- remove ps stats from notification +* yet another fix cpu* and cpucl* Ver.2.0.1: + add support of custom interfaces diff --git a/CHANGELOG-RU b/CHANGELOG-RU index d8100f6..ae0cf6e 100644 --- a/CHANGELOG-RU +++ b/CHANGELOG-RU @@ -1,5 +1,8 @@ Вер.2.0.2: + добавлены теги $fan* ++ добавлен китайский перевод (спасибо @Lemueler) +- удалено ps stats из уведомлений +* еще один фикс тегов cpu* и cpucl Вер.2.0.1: + добавлена поддержка кастомных интерфейсов diff --git a/aticonfig-output b/aticonfig-output new file mode 100644 index 0000000..8237cd6 --- /dev/null +++ b/aticonfig-output @@ -0,0 +1,12 @@ +aticonfig --od-gettemperature + +Default Adapter - AMD Radeon HD 7800 Series + Sensor 0: Temperature - 50.00 C +aticonfig --od-getclocks + +Default Adapter - AMD Radeon HD 7800 Series + Core (MHz) Memory (MHz) + Current Clocks : 1100 1250 + Current Peak : 1100 1250 + Configurable Peak Range : [300-1050] [150-1450] + GPU load : 99% diff --git a/sources/awesome-widget/customlabel.cpp b/sources/awesome-widget/customlabel.cpp index bfa43f2..47b9146 100644 --- a/sources/awesome-widget/customlabel.cpp +++ b/sources/awesome-widget/customlabel.cpp @@ -90,21 +90,6 @@ void CustomLabel::mousePressEvent(QGraphicsSceneMouseEvent *event) if (process.exitCode != 0) if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; text += QString("Uptime: %1\n").arg(QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed()); - // ps stats - cmd = QString("ps --no-headers -o command"); - if (debug) qDebug() << PDEBUG << ":" << "cmd" << cmd; - process = runTask(cmd); - if (debug) qDebug() << PDEBUG << ":" << "Cmd returns" << process.exitCode; - if (process.exitCode != 0) - if (debug) qDebug() << PDEBUG << ":" << "Error" << process.error; - QString qoutput = QTextCodec::codecForMib(106)->toUnicode(process.output).trimmed(); - QStringList processes; - for (int i=0; isendNotification(QString("system"), text); } diff --git a/sources/awesome-widget/deinteraction.cpp b/sources/awesome-widget/deinteraction.cpp index b6499ae..b753c8f 100644 --- a/sources/awesome-widget/deinteraction.cpp +++ b/sources/awesome-widget/deinteraction.cpp @@ -35,7 +35,7 @@ void AwesomeWidget::connectToEngine() extsysmonEngine->connectSource(QString("battery"), this, configuration[QString("interval")].toInt()); // cpu - regExp = QRegExp(QString("cpu[0-9].*")); + regExp = QRegExp(QString("cpu(?!cl).*")); if ((foundKeys.indexOf(regExp) > -1) || (configuration[QString("cpuTooltip")].toInt() == 2)) { sysmonEngine->connectSource(QString("cpu/system/TotalLoad"), @@ -45,7 +45,7 @@ void AwesomeWidget::connectToEngine() this, configuration[QString("interval")].toInt()); } // cpuclock - regExp = QRegExp(QString("cpucl[0-9].*")); + regExp = QRegExp(QString("cpucl.*")); if ((foundKeys.indexOf(regExp) > -1) || (configuration[QString("cpuclTooltip")].toInt() == 2)) { sysmonEngine->connectSource(QString("cpu/system/AverageClock"), @@ -442,7 +442,7 @@ void AwesomeWidget::disconnectFromEngine() (configuration[QString("batteryTooltip")].toInt() == 2)) extsysmonEngine->disconnectSource(QString("battery"), this); // cpu - regExp = QRegExp(QString("cpu.*")); + regExp = QRegExp(QString("cpu(?!cl).*")); if ((foundKeys.indexOf(regExp) > -1) || (configuration[QString("cpuTooltip")].toInt() == 2)) { sysmonEngine->disconnectSource(QString("cpu/system/TotalLoad"), this);