From e9e5040bf35f489005b28f8c8ca09034e31dd066 Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 18 May 2026 04:04:59 -0400 Subject: [PATCH] Refresh idle indicator on bar IPC --- shell/plugins/bar/Bar.qml | 3 +++ shell/plugins/bar/widgets/idleInhibitor.qml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/shell/plugins/bar/Bar.qml b/shell/plugins/bar/Bar.qml index 1baaf84e..c6ce3630 100644 --- a/shell/plugins/bar/Bar.qml +++ b/shell/plugins/bar/Bar.qml @@ -82,6 +82,8 @@ Item { readonly property bool vertical: position === "left" || position === "right" readonly property int barSize: vertical ? 28 : 26 + signal indicatorsRefreshRequested() + function normalizePosition(value) { var next = String(value || "").trim() return /^(top|bottom|left|right)$/.test(next) ? next : "top" @@ -417,6 +419,7 @@ Item { function refreshIndicators() { refreshScreenRecording() runProcess(notificationSilencingProc) + indicatorsRefreshRequested() } function workspaceById(id) { diff --git a/shell/plugins/bar/widgets/idleInhibitor.qml b/shell/plugins/bar/widgets/idleInhibitor.qml index 234c0a28..111049c0 100644 --- a/shell/plugins/bar/widgets/idleInhibitor.qml +++ b/shell/plugins/bar/widgets/idleInhibitor.qml @@ -25,6 +25,12 @@ Item { Component.onCompleted: refresh() + Connections { + target: root.bar + ignoreUnknownSignals: true + function onIndicatorsRefreshRequested() { root.refresh() } + } + Process { id: statusProc command: ["bash", "-lc", "pgrep -x hypridle >/dev/null 2>&1 && echo running || echo stopped"]