mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
sysstat: show cpu-cores at false by default
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
"useMonospaceFont": true,
|
||||
"usePadding": false,
|
||||
"showCpuUsage": true,
|
||||
"showCpuCores": true,
|
||||
"showCpuCores": false,
|
||||
"showCpuFreq": false,
|
||||
"showCpuTemp": true,
|
||||
"showGpuTemp": false,
|
||||
|
||||
@@ -1161,15 +1161,17 @@ Singleton {
|
||||
root.coresUsage = new Array(nbCores).fill(0);
|
||||
|
||||
let coresStats = [];
|
||||
let newCoresUsage = root.coresUsage.slice();
|
||||
for (let i = 0; i < nbCores; i++) {
|
||||
const coreCpuLine = lines[i + 1];
|
||||
const currCoreStats = calculateLineUsage(coreCpuLine);
|
||||
const coreUsage = computeUsage(root.prevCpuCoresStats?.[i], currCoreStats);
|
||||
if (coreUsage >= 0) {
|
||||
root.coresUsage[i] = coreUsage;
|
||||
newCoresUsage[i] = coreUsage;
|
||||
}
|
||||
coresStats.push(currCoreStats);
|
||||
}
|
||||
root.coresUsage = newCoresUsage;
|
||||
root.prevCpuCoresStats = coresStats;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user