1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-01 19:18:28 -04:00

niri: re-work layer-rule to exclude bar for xray instead of using 2

rules
This commit is contained in:
bbedward
2026-07-03 23:13:25 -04:00
parent ebad8e2dda
commit 66d552b3d5
+5 -13
View File
@@ -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 += `