1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

niri: generate wpblur.kdl

This commit is contained in:
bbedward
2025-10-27 17:21:26 -04:00
parent e7debdcf46
commit b46fe28c05
3 changed files with 24 additions and 0 deletions

View File

@@ -347,6 +347,7 @@ Singleton {
compositor = "niri"
console.info("CompositorService: Detected Niri with socket:", niriSocket)
NiriService.generateNiriBinds()
NiriService.generateNiriBlurrule()
} else {
isHyprland = false
isNiri = true

View File

@@ -892,4 +892,17 @@ window-rule {
writeBindsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && cp --no-preserve=mode "${sourceBindsPath}" "${bindsPath}"`]
writeBindsProcess.running = true
}
function generateNiriBlurrule() {
console.log("NiriService: Generating wpblur config...")
const configDir = Paths.strip(StandardPaths.writableLocation(StandardPaths.ConfigLocation))
const niriDmsDir = configDir + "/niri/dms"
const blurrulePath = niriDmsDir + "/wpblur.kdl"
const sourceBlurrulePath = Paths.strip(Qt.resolvedUrl("niri-wpblur.kdl"))
writeBindsProcess.bindsPath = blurrulePath
writeBindsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && cp --no-preserve=mode "${sourceBlurrulePath}" "${blurrulePath}"`]
writeBindsProcess.running = true
}
}

10
Services/niri-wpblur.kdl Normal file
View File

@@ -0,0 +1,10 @@
layer-rule {
match namespace="dms:blurwallpaper"
opacity 0.0
}
layer-rule {
match namespace="dms:blurwallpaper"
place-within-backdrop true
opacity 1.0
}