From 4fb7d7a7db0761dbde7e22f0d860fc9ed9a2562a Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 24 May 2025 11:02:24 +0200 Subject: [PATCH] resources and system info: use triggeredOnStart --- .config/quickshell/services/ResourceUsage.qml | 4 ++-- .config/quickshell/services/SystemInfo.qml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/quickshell/services/ResourceUsage.qml b/.config/quickshell/services/ResourceUsage.qml index 39078fbde..a0321d918 100644 --- a/.config/quickshell/services/ResourceUsage.qml +++ b/.config/quickshell/services/ResourceUsage.qml @@ -19,7 +19,8 @@ Singleton { property var previousCpuStats Timer { - interval: 10 + triggeredOnStart: true + interval: ConfigOptions?.resources?.updateInterval ?? 3000 running: true repeat: true onTriggered: { @@ -50,7 +51,6 @@ Singleton { previousCpuStats = { total, idle } } - interval = ConfigOptions?.resources?.updateInterval ?? 3000 } } diff --git a/.config/quickshell/services/SystemInfo.qml b/.config/quickshell/services/SystemInfo.qml index 23f798264..8660693e8 100644 --- a/.config/quickshell/services/SystemInfo.qml +++ b/.config/quickshell/services/SystemInfo.qml @@ -12,6 +12,7 @@ Singleton { property string username: "user" Timer { + triggeredOnStart: true interval: 1 running: true repeat: false