extract cpu service from system stats, add --types filter to nova-stats
This commit is contained in:
parent
8628b4b27b
commit
29e06eadb5
7 changed files with 227 additions and 189 deletions
|
|
@ -8,25 +8,18 @@ M.BarModule {
|
|||
id: root
|
||||
active: S.Modules.cpu.enable
|
||||
spacing: Math.max(1, S.Theme.moduleSpacing - 2)
|
||||
tooltip: "CPU: " + S.SystemStats.cpuUsage + "% @ " + S.SystemStats.cpuFreqGhz.toFixed(2) + " GHz"
|
||||
tooltip: "CPU: " + S.CpuService.usage + "% @ " + S.CpuService.freqGhz.toFixed(2) + " GHz"
|
||||
panelNamespace: "nova-cpu"
|
||||
panelContentWidth: 260
|
||||
panelComponent: Component {
|
||||
C.CpuApplet {
|
||||
width: parent.width
|
||||
cores: root._cores
|
||||
coreMaxFreq: root._coreMaxFreq
|
||||
coreTypes: root._coreTypes
|
||||
processes: root._procs.processes
|
||||
accentColor: root.accentColor
|
||||
active: root._showPanel
|
||||
}
|
||||
}
|
||||
|
||||
readonly property var _cores: S.SystemStats.cpuCores
|
||||
readonly property var _coreMaxFreq: S.SystemStats.cpuCoreMaxFreq
|
||||
readonly property var _coreTypes: S.SystemStats.cpuCoreTypes
|
||||
|
||||
property M.ProcessList _procs: M.ProcessList {
|
||||
sortBy: "cpu"
|
||||
active: root._showPanel
|
||||
|
|
@ -38,7 +31,7 @@ M.BarModule {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
M.BarLabel {
|
||||
label: S.SystemStats.cpuUsage.toString().padStart(2) + "%@" + S.SystemStats.cpuFreqGhz.toFixed(2)
|
||||
label: S.CpuService.usage.toString().padStart(2) + "%@" + S.CpuService.freqGhz.toFixed(2)
|
||||
minText: "99%@9.99"
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue