From d3f5b8f32ed175627969f839c5363e3bf525d0b8 Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 12 Dec 2025 16:58:07 -0500 Subject: [PATCH] niri: fix gap reactivity --- quickshell/Services/NiriService.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/quickshell/Services/NiriService.qml b/quickshell/Services/NiriService.qml index 4d89b155..7d725210 100644 --- a/quickshell/Services/NiriService.qml +++ b/quickshell/Services/NiriService.qml @@ -66,6 +66,19 @@ Singleton { onTriggered: root.doGenerateNiriLayoutConfig() } + property int _lastGapValue: -1 + + Connections { + target: SettingsData + function onBarConfigsChanged() { + const newGaps = Math.max(4, (SettingsData.barConfigs[0]?.spacing ?? 4)); + if (newGaps === root._lastGapValue) + return; + root._lastGapValue = newGaps; + generateNiriLayoutConfig(); + } + } + Process { id: validateProcess command: ["niri", "validate"]