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 += `