mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-15 06:45:48 +00:00
some work on porting
This commit is contained in:
@ -21,7 +21,7 @@ import org.kde.plasma.plasmoid 2.0
|
||||
import org.kde.plasma.core 2.0 as PlasmaCore
|
||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||
|
||||
import org.kde.plasma.private.awesome-widget 1.0
|
||||
import org.kde.plasma.private.awesomewidget 1.0
|
||||
|
||||
|
||||
Item {
|
||||
@ -59,36 +59,27 @@ Item {
|
||||
PlasmaCore.DataSource {
|
||||
id: systemmonitorDE
|
||||
engine: "systemmonitor"
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.log("[main::onCompleted] : Connect sources to systemmonitor")
|
||||
|
||||
systemmonitorDE.connectAllSources(main, plasmoid.configuration.interval)
|
||||
}
|
||||
connectedSources: systemmonitorDE.sources
|
||||
interval: plasmoid.configuration.autoUpdateInterval
|
||||
|
||||
onNewData: {
|
||||
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
||||
|
||||
if ((data.value == "N\\A") || (data.value == "")) return
|
||||
// update
|
||||
info[sourceName] = data.value
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: extsysmonDE
|
||||
engine: "ext-sysmon"
|
||||
|
||||
Component.onCompleted: {
|
||||
if (debug) console.log("[main::onCompleted] : Connect sources to ext-sysmon")
|
||||
|
||||
extsysmonDE.connectAllSources(main, plasmoid.configuration.interval)
|
||||
}
|
||||
connectedSources: extsysmonDE.sources
|
||||
interval: plasmoid.configuration.autoUpdateInterval
|
||||
|
||||
onNewData: {
|
||||
if (debug) console.log("[main::onNewData] : Update source " + sourceName)
|
||||
|
||||
if (sourceName == "update") needUpdate()
|
||||
// if (sourceName == "update") needUpdate()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ X-Plasma-RemoteLocation=
|
||||
|
||||
X-KDE-PluginInfo-Author=Evgeniy Alekseev aka arcanis
|
||||
X-KDE-PluginInfo-Email=esalexeev@gmail.com
|
||||
X-KDE-PluginInfo-Name=org.kde.plasma.awesome-widget
|
||||
X-KDE-PluginInfo-Name=org.kde.plasma.awesomewidget
|
||||
X-KDE-PluginInfo-Version=@PROJECT_VERSION@
|
||||
X-KDE-PluginInfo-Website=http://arcanis.name/projects/awesome-widgets/
|
||||
X-KDE-PluginInfo-Category=System Information
|
||||
|
Reference in New Issue
Block a user