summaryrefslogtreecommitdiff
path: root/services/SystemUsage.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-20 00:25:00 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-06-20 00:25:00 +1000
commitb80b531e884714d2807429600341ba56c3911a9d (patch)
tree5e681107114088b0b32a45549e311b7936ae89d0 /services/SystemUsage.qml
parentlauncher: fix again (diff)
downloadcaelestia-shell-b80b531e884714d2807429600341ba56c3911a9d.tar.gz
caelestia-shell-b80b531e884714d2807429600341ba56c3911a9d.tar.bz2
caelestia-shell-b80b531e884714d2807429600341ba56c3911a9d.zip
systemusage: fix cpu calculation
Fixes #79
Diffstat (limited to 'services/SystemUsage.qml')
-rw-r--r--services/SystemUsage.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/SystemUsage.qml b/services/SystemUsage.qml
index 9bf665a..d958dba 100644
--- a/services/SystemUsage.qml
+++ b/services/SystemUsage.qml
@@ -70,7 +70,7 @@ Singleton {
if (data) {
const stats = data.slice(1).map(n => parseInt(n, 10));
const total = stats.reduce((a, b) => a + b, 0);
- const idle = stats[3];
+ const idle = stats[3] + (stats[4] ?? 0);
const totalDiff = total - root.lastCpuTotal;
const idleDiff = idle - root.lastCpuIdle;