mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 17:22:08 -04:00
@@ -167,46 +167,6 @@ 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Process {
|
|
||||||
id: ensureCursorProcess
|
|
||||||
property string cursorPath: ""
|
|
||||||
|
|
||||||
onExited: exitCode => {
|
|
||||||
if (exitCode !== 0)
|
|
||||||
console.warn("NiriService: Failed to ensure cursor.kdl, exit code:", exitCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Process {
|
|
||||||
id: ensureWindowrulesProcess
|
|
||||||
property string windowrulesPath: ""
|
|
||||||
|
|
||||||
onExited: exitCode => {
|
|
||||||
if (exitCode !== 0)
|
|
||||||
console.warn("NiriService: Failed to ensure windowrules.kdl, exit code:", exitCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DankSocket {
|
DankSocket {
|
||||||
id: eventStreamSocket
|
id: eventStreamSocket
|
||||||
path: root.socketPath
|
path: root.socketPath
|
||||||
@@ -1230,25 +1190,13 @@ Singleton {
|
|||||||
writeAlttabProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && cat > "${alttabPath}" << 'EOF'\n${alttabContent}\nEOF`];
|
writeAlttabProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && cat > "${alttabPath}" << 'EOF'\n${alttabContent}\nEOF`];
|
||||||
writeAlttabProcess.running = true;
|
writeAlttabProcess.running = true;
|
||||||
|
|
||||||
const outputsPath = niriDmsDir + "/outputs.kdl";
|
for (const name of ["outputs", "binds", "cursor", "windowrules", "colors"]) {
|
||||||
ensureOutputsProcess.outputsPath = outputsPath;
|
const path = niriDmsDir + "/" + name + ".kdl";
|
||||||
ensureOutputsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${outputsPath}" ] && touch "${outputsPath}" || true`];
|
Proc.runCommand("niri-ensure-" + name, ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${path}" ] && touch "${path}" || true`], (output, exitCode) => {
|
||||||
ensureOutputsProcess.running = true;
|
if (exitCode !== 0)
|
||||||
|
console.warn("NiriService: Failed to ensure " + name + ".kdl, exit code:", exitCode);
|
||||||
const bindsPath = niriDmsDir + "/binds.kdl";
|
});
|
||||||
ensureBindsProcess.bindsPath = bindsPath;
|
}
|
||||||
ensureBindsProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${bindsPath}" ] && touch "${bindsPath}" || true`];
|
|
||||||
ensureBindsProcess.running = true;
|
|
||||||
|
|
||||||
const cursorPath = niriDmsDir + "/cursor.kdl";
|
|
||||||
ensureCursorProcess.cursorPath = cursorPath;
|
|
||||||
ensureCursorProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${cursorPath}" ] && touch "${cursorPath}" || true`];
|
|
||||||
ensureCursorProcess.running = true;
|
|
||||||
|
|
||||||
const windowrulesPath = niriDmsDir + "/windowrules.kdl";
|
|
||||||
ensureWindowrulesProcess.windowrulesPath = windowrulesPath;
|
|
||||||
ensureWindowrulesProcess.command = ["sh", "-c", `mkdir -p "${niriDmsDir}" && [ ! -f "${windowrulesPath}" ] && touch "${windowrulesPath}" || true`];
|
|
||||||
ensureWindowrulesProcess.running = true;
|
|
||||||
|
|
||||||
configGenerationPending = false;
|
configGenerationPending = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user