mirror of
				https://github.com/arcan1s/awesome-widgets.git
				synced 2025-10-31 05:13:40 +00:00 
			
		
		
		
	debug settings for dataengine is read now from environment
This commit is contained in:
		
							
								
								
									
										2
									
								
								PKGBUILD
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								PKGBUILD
									
									
									
									
									
								
							| @ -21,7 +21,7 @@ optdepends=("amarok: for music player monitor" | ||||
| makedepends=('automoc4' 'cmake') | ||||
| source=(https://github.com/arcan1s/pytextmonitor/releases/download/V.${pkgver}/${_pkgname}-${pkgver}-src.tar.xz) | ||||
| install=${pkgname}.install | ||||
| md5sums=('7366d3a97c2426f3ffe769e74f83a86b') | ||||
| md5sums=('8b88e0095c91dc4b0dec0f308c6528fa') | ||||
| backup=('usr/share/config/extsysmon.conf') | ||||
|  | ||||
| prepare() { | ||||
|  | ||||
| @ -30,6 +30,3 @@ | ||||
|  | ||||
| # Player name. Supported players are amarok, clementine, mpd, qmmp | ||||
| #PLAYER=amarok | ||||
|  | ||||
| # Enable some debug information (yes or no) | ||||
| #DEBUG=no | ||||
|  | ||||
| @ -24,6 +24,7 @@ | ||||
| #include <QDebug> | ||||
| #include <QFile> | ||||
| #include <QProcess> | ||||
| #include <QProcessEnvironment> | ||||
| #include <QRegExp> | ||||
| #include <QTextCodec> | ||||
|  | ||||
| @ -33,8 +34,15 @@ ExtendedSysMon::ExtendedSysMon(QObject* parent, const QVariantList& args) | ||||
| { | ||||
|     Q_UNUSED(args) | ||||
|  | ||||
|     // debug | ||||
|     QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); | ||||
|     QString debugEnv = environment.value(QString("PTM_DE_DEBUG"), QString("no")); | ||||
|     if (debugEnv == QString("yes")) | ||||
|         debug = true; | ||||
|     else | ||||
|         debug = false; | ||||
|  | ||||
|     setMinimumPollingInterval(333); | ||||
|     debug = true; | ||||
|     readConfiguration(); | ||||
| } | ||||
|  | ||||
| @ -101,7 +109,6 @@ void ExtendedSysMon::readConfiguration() | ||||
|     // pre-setup | ||||
|     QMap<QString, QString> rawConfig; | ||||
|     rawConfig[QString("CUSTOM")] = QString("wget -qO- http://ifconfig.me/ip"); | ||||
|     rawConfig[QString("DEBUG")] = QString("no"); | ||||
|     rawConfig[QString("GPUDEV")] = QString("auto"); | ||||
|     rawConfig[QString("HDDDEV")] = QString("all"); | ||||
|     rawConfig[QString("HDDTEMPCMD")] = QString("sudo hddtemp"); | ||||
| @ -154,12 +161,6 @@ QMap<QString, QString> ExtendedSysMon::updateConfiguration(const QMap<QString, Q | ||||
|         config[key] = value; | ||||
|     } | ||||
|     // update values | ||||
|     // debug | ||||
|     if ((config[QString("DEBUG")] != QString("yes")) && | ||||
|         (config[QString("DEBUG")] != QString("no"))) | ||||
|         config[QString("DEBUG")] = QString("no"); | ||||
|     if (config[QString("DEBUG")] == QString("no")) | ||||
|         debug = false; | ||||
|     // gpudev | ||||
|     if (config[QString("GPUDEV")] == QString("disable")) | ||||
|         config[QString("GPUDEV")] = QString("disable"); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user