mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-09 06:58:29 -04:00
niri: re-work layer-rule to exclude bar for xray instead of using 2
rules
This commit is contained in:
@@ -1193,28 +1193,20 @@ Singleton {
|
|||||||
// Connected frame mode has no separate bar/frame surface to target
|
// Connected frame mode has no separate bar/frame surface to target
|
||||||
const barFrameTargetNamespace = !frameEnabled ? (SettingsData.standaloneBarXrayAvailable ? "dms:bar" : null) : (frameConnectedMode ? null : "dms:frame");
|
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 = "";
|
let xrayRules = "";
|
||||||
if (!layoutXrayEnabled) {
|
if (!layoutXrayEnabled) {
|
||||||
|
const excludeLine = (layoutBarXrayEnabled && barFrameTargetNamespace) ? `\n exclude namespace="^${barFrameTargetNamespace}$"` : "";
|
||||||
xrayRules += `
|
xrayRules += `
|
||||||
|
|
||||||
layer-rule {
|
layer-rule {${excludeLine}
|
||||||
background-effect {
|
background-effect {
|
||||||
xray false
|
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
|
// Marker persists the preference even while the rule has no target
|
||||||
if (!layoutBarXrayEnabled)
|
if (!layoutBarXrayEnabled)
|
||||||
xrayRules += `
|
xrayRules += `
|
||||||
|
|||||||
Reference in New Issue
Block a user