From 66d552b3d55b1576d0438fe78b70e7eb0db238ed Mon Sep 17 00:00:00 2001 From: bbedward Date: Fri, 3 Jul 2026 23:13:25 -0400 Subject: [PATCH] niri: re-work layer-rule to exclude bar for xray instead of using 2 rules --- quickshell/Services/NiriService.qml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/quickshell/Services/NiriService.qml b/quickshell/Services/NiriService.qml index 8cc9f3d1f..de1f87472 100644 --- a/quickshell/Services/NiriService.qml +++ b/quickshell/Services/NiriService.qml @@ -1193,28 +1193,20 @@ Singleton { // Connected frame mode has no separate bar/frame surface to target const barFrameTargetNamespace = !frameEnabled ? (SettingsData.standaloneBarXrayAvailable ? "dms:bar" : null) : (frameConnectedMode ? null : "dms:frame"); - // Xray is niri's default blur, so only the off state needs a rule + // Xray is niri's default blur, so only the off state needs a rule. + // A single rule excluding the bar/frame keeps its blur on the wallpaper + // without a second namespace-matched override rule. let xrayRules = ""; if (!layoutXrayEnabled) { + const excludeLine = (layoutBarXrayEnabled && barFrameTargetNamespace) ? `\n exclude namespace="^${barFrameTargetNamespace}$"` : ""; xrayRules += ` -layer-rule { +layer-rule {${excludeLine} background-effect { xray false } }`; } - - if (layoutBarXrayEnabled && barFrameTargetNamespace) { - xrayRules += ` - -layer-rule { - match namespace="^${barFrameTargetNamespace}$" - background-effect { - xray true - } -}`; - } // Marker persists the preference even while the rule has no target if (!layoutBarXrayEnabled) xrayRules += `