mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-24 15:37:23 +00:00
fix cpu* tags
fix notifiations
This commit is contained in:
parent
f61948d9b3
commit
99049164be
1
AUTHORS
1
AUTHORS
@ -6,3 +6,4 @@ Translators:
|
||||
Ernesto Avilés Vzqz (Spanish translation)
|
||||
@underr (Brazillian Portuguese translation)
|
||||
Виктор Слободян (Ukrainian translation)
|
||||
Steve Lemuel (Chinese translation)
|
||||
|
@ -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
|
||||
|
@ -1,5 +1,8 @@
|
||||
Вер.2.0.2:
|
||||
+ добавлены теги $fan*
|
||||
+ добавлен китайский перевод (спасибо @Lemueler)
|
||||
- удалено ps stats из уведомлений
|
||||
* еще один фикс тегов cpu* и cpucl
|
||||
|
||||
Вер.2.0.1:
|
||||
+ добавлена поддержка кастомных интерфейсов
|
||||
|
12
aticonfig-output
Normal file
12
aticonfig-output
Normal file
@ -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%
|
@ -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; i<qoutput.split(QChar('\n')).count(); i++)
|
||||
if (qoutput.split(QChar('\n'))[i] != QString("ps --no-headers -o command"))
|
||||
processes.append(qoutput.split(QChar('\n'))[i]);
|
||||
text += QString("ps stats: %1 | %2")
|
||||
.arg(processes.count())
|
||||
.arg(processes.join(QChar(',')));
|
||||
|
||||
widget->sendNotification(QString("system"), text);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user