mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-10 04:15:51 +00:00
refactor: simplify sources processing
Also fix desktop source
This commit is contained in:
@ -57,34 +57,33 @@ void ExtSysMonAggregator::init(const QHash<QString, QString> &_config)
|
||||
qCDebug(LOG_ESM) << "Configuration" << _config;
|
||||
|
||||
// battery
|
||||
createSensor("battery", i18n("Battery"), new BatterySource(this, {_config["ACPIPATH"]}));
|
||||
createSensor("battery", i18n("Battery"), new BatterySource(this, _config["ACPIPATH"]));
|
||||
// custom
|
||||
createSensor("custom", i18n("Scripts"), new CustomSource(this, {}));
|
||||
createSensor("custom", i18n("Scripts"), new CustomSource(this));
|
||||
// desktop
|
||||
// FIXME causes segfault in kde libs
|
||||
// createSensor("desktop", i18n("Desktop"), new DesktopSource(this, {}));
|
||||
createSensor("desktop", i18n("Desktop"), new DesktopSource(this));
|
||||
// network
|
||||
createSensor("network", i18n("Network"), new NetworkSource(this, {}));
|
||||
createSensor("network", i18n("Network"), new NetworkSource(this));
|
||||
// player
|
||||
createSensor("player", i18n("Music player"),
|
||||
new PlayerSource(this, {_config["PLAYER"], _config["MPDADDRESS"], _config["MPDPORT"], _config["MPRIS"],
|
||||
_config["PLAYERSYMBOLS"]}));
|
||||
new PlayerSource(this, _config["PLAYER"], _config["MPDADDRESS"], _config["MPDPORT"].toInt(),
|
||||
_config["MPRIS"], _config["PLAYERSYMBOLS"].toInt()));
|
||||
// processes
|
||||
createSensor("ps", i18n("Processes"), new ProcessesSource(this, {}));
|
||||
createSensor("ps", i18n("Processes"), new ProcessesSource(this));
|
||||
// network request
|
||||
createSensor("requests", i18n("Network requests"), new RequestSource(this, {}));
|
||||
createSensor("requests", i18n("Network requests"), new RequestSource(this));
|
||||
// quotes
|
||||
createSensor("quotes", i18n("Quotes"), new QuotesSource(this, {}));
|
||||
createSensor("quotes", i18n("Quotes"), new QuotesSource(this));
|
||||
// system
|
||||
createSensor("system", i18n("System"), new SystemInfoSource(this, {}));
|
||||
createSensor("system", i18n("System"), new SystemInfoSource(this));
|
||||
// current time
|
||||
createSensor("time", i18n("Time"), new TimeSource(this, {}));
|
||||
createSensor("time", i18n("Time"), new TimeSource(this));
|
||||
// upgrade
|
||||
createSensor("upgrade", i18n("Upgrades"), new UpgradeSource(this, {}));
|
||||
createSensor("upgrade", i18n("Upgrades"), new UpgradeSource(this));
|
||||
// weather
|
||||
createSensor("weather", i18n("Weather"), new WeatherSource(this, {}));
|
||||
createSensor("weather", i18n("Weather"), new WeatherSource(this));
|
||||
#ifdef BUILD_LOAD
|
||||
// additional load source
|
||||
createSensor("load", i18n("Load"), new LoadSource(this, {}));
|
||||
createSensor("load", i18n("Load"), new LoadSource(this));
|
||||
#endif /* BUILD_LOAD */
|
||||
}
|
||||
|
Reference in New Issue
Block a user