From b80b531e884714d2807429600341ba56c3911a9d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Fri, 20 Jun 2025 00:25:00 +1000 Subject: systemusage: fix cpu calculation Fixes #79 --- services/SystemUsage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3-freya