1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

niri: ensure outputs.kdl and binds.kdl exist

This commit is contained in:
bbedward
2026-01-03 18:31:36 -05:00
parent 3bb2696263
commit 913bb2ff67

View File

@@ -145,6 +145,26 @@ Singleton {
}
}
Process {
id: ensureOutputsProcess
property string outputsPath: ""
onExited: exitCode => {
if (exitCode !== 0)
console.warn("NiriService: Failed to ensure outputs.kdl, exit code:", exitCode);
}
}
Process {
id: ensureBindsProcess
property string bindsPath: ""
onExited: exitCode => {
if (exitCode !== 0)
console.warn("NiriService: Failed to ensure binds.kdl, exit code:", exitCode);
}
}
DankSocket {
id: eventStreamSocket
path: root.socketPath
@@ -1042,6 +1062,16 @@ Singleton {
writeAlttabProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && cat > "${alttabPath}" << 'EOF'\n${alttabContent}\nEOF`];
writeAlttabProcess.running = true;
const outputsPath = niriDmsDir + "/outputs.kdl";
ensureOutputsProcess.outputsPath = outputsPath;
ensureOutputsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${outputsPath}" ] && touch "${outputsPath}" || true`];
ensureOutputsProcess.running = true;
const bindsPath = niriDmsDir + "/binds.kdl";
ensureBindsProcess.bindsPath = bindsPath;
ensureBindsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${bindsPath}" ] && touch "${bindsPath}" || true`];
ensureBindsProcess.running = true;
configGenerationPending = false;
}