From 8ec794a1b46ac26c5a1db69a480b12ac49ff120a Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Mon, 18 May 2026 00:55:46 -0400 Subject: [PATCH] Fix brightness slider h/l bouncing to zero --- .../omarchy-shell/plugins/bar/widgets/monitorPanel.qml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/default/quickshell/omarchy-shell/plugins/bar/widgets/monitorPanel.qml b/default/quickshell/omarchy-shell/plugins/bar/widgets/monitorPanel.qml index 1bb3d524..1365c9e6 100644 --- a/default/quickshell/omarchy-shell/plugins/bar/widgets/monitorPanel.qml +++ b/default/quickshell/omarchy-shell/plugins/bar/widgets/monitorPanel.qml @@ -327,12 +327,17 @@ Item { Process { id: setBrightnessProc stdout: StdioCollector { waitForEnd: true } + // Do NOT call refresh() after a brightness set completes. The local + // brightnessPercent we just wrote is authoritative; re-reading via + // `omarchy-brightness-display` races the hardware/driver and can + // return an empty string, which the parser then coerces to 0 — + // visible as a "bounce to zero" after h/l keypresses. External + // brightness changes are still picked up by the 5s periodic refresh, + // the open-time refresh, and Component.onCompleted. onRunningChanged: { if (running) return if (root.brightnessSetQueued) { root.setBrightness(root.pendingBrightnessPercent) - } else { - root.refresh() } } }