diff --git a/PKGBUILD b/PKGBUILD index 0d4723d..b9c868b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -22,8 +22,9 @@ makedepends=('automoc4' 'cmake') source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}.plasmoid https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_dtengine}-${_dtver}.zip) install=${pkgname}.install -md5sums=('9872eedca313768f18de0facc2fc135d' - '29a0fbc2014b0b7cacfab8186a56a1b6') +md5sums=('3e128738a0fcb90f41c57bd6cc4a249c' + 'ff3144a9f0d74f80a5ab6bf2f3bdf9a1') +backup=('usr/share/config/extsysmon.conf') build () { diff --git a/ext-sysmon-1.5.zip b/ext-sysmon-1.5.zip index 3203b42..14e1296 100644 Binary files a/ext-sysmon-1.5.zip and b/ext-sysmon-1.5.zip differ diff --git a/ext-sysmon/CMakeLists.txt b/ext-sysmon/CMakeLists.txt index a5ed7f7..7a4c687 100644 --- a/ext-sysmon/CMakeLists.txt +++ b/ext-sysmon/CMakeLists.txt @@ -23,4 +23,4 @@ target_link_libraries (${PLUGIN_NAME} ${KDE4_KDECORE_LIBS} ${KDE4_PLASMA_LIBS}) # install install (TARGETS ${PLUGIN_NAME} DESTINATION ${PLUGIN_INSTALL_DIR}) install (FILES ${PROJECT_DESKTOP} DESTINATION ${SERVICES_INSTALL_DIR}) -install (FILES ${PROJECT_CONF} DESTINATION ../etc/) +install (FILES ${PROJECT_CONF} DESTINATION ${CONFIG_INSTALL_DIR}) diff --git a/ext-sysmon/extsysmon.cpp b/ext-sysmon/extsysmon.cpp index 2964426..42f1efc 100644 --- a/ext-sysmon/extsysmon.cpp +++ b/ext-sysmon/extsysmon.cpp @@ -31,7 +31,7 @@ ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args) Q_UNUSED(args) setMinimumPollingInterval(333); - readConfiguration(QString("/etc/extsysmon.conf")); + readConfiguration(QString("/usr/share/config/extsysmon.conf")); } QStringList ExtendedSysMon::sources() const @@ -86,30 +86,32 @@ bool ExtendedSysMon::readConfiguration(const QString confFileName) break; else if (fileStr[0] != '#') { - if (fileStr.split(QString("="), QString::SkipEmptyParts).count() == 1) + if (fileStr.split(QString("="), QString::SkipEmptyParts).count() == 2) { if (fileStr.split(QString("="), QString::SkipEmptyParts)[0] == QString("GPUDEV")) { - if (fileStr.split(QString("="), QString::SkipEmptyParts)[1] == QString("ati")) - gpudev = fileStr.split(QString("="), QString::SkipEmptyParts)[1]; - else if (fileStr.split(QString("="), QString::SkipEmptyParts)[1] == QString("nvidia")) - gpudev = fileStr.split(QString("="), QString::SkipEmptyParts)[1]; - else if (fileStr.split(QString("="), QString::SkipEmptyParts)[1] == QString("ignore")) + if (fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0] == QString("ati")) + gpudev = fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0]; + else if (fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0] == QString("nvidia")) + gpudev = fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0]; + else if (fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0] != QString("auto")) gpudev = QString("ignore"); } else if (fileStr.split(QString("="), QString::SkipEmptyParts)[0] == QString("HDDDEV")) { - if (fileStr.split(QString("="), QString::SkipEmptyParts)[1] != QString("all")) + if (fileStr.split(QString("="), QString::SkipEmptyParts)[1].split(QString("\n"), QString::SkipEmptyParts)[0] != QString("all")) { hdddev.clear(); - for (int i=0; i /dev/null", "r"); + char commandStr[512]; + sprintf (commandStr, "echo 'currentsong\nclose' | curl --connect-timeout 1 -fsm 3 telnet://%s:%s 2> /dev/null", \ + mpdAddress.toUtf8().data(), mpdPort.toUtf8().data()); + f_out = popen(commandStr, "r"); while (true) { fgets(output, 256, f_out); diff --git a/py-text-monitor-1.5.1.plasmoid b/py-text-monitor-1.5.1.plasmoid index 248d8a7..784c867 100644 Binary files a/py-text-monitor-1.5.1.plasmoid and b/py-text-monitor-1.5.1.plasmoid differ