niri: fix gap reactivity

This commit is contained in:
bbedward committed 2025-12-15 21:15:47 -05:00
1 parent 32998a5219
commit f8179167a8
1 file changed
+13
+13
View File
@@ -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"]