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

networking: improve wifi experience and bugs

This commit is contained in:
bbedward
2025-07-22 11:50:07 -04:00
parent a4da6921bd
commit 02bd9bbc72
7 changed files with 1166 additions and 395 deletions

View File

@@ -119,25 +119,13 @@ Singleton {
updateProcessList();
}
property int killPid: 0
function killProcess(pid) {
if (pid > 0) {
const killCmd = ["bash", "-c", "kill " + pid];
const killProcess = Qt.createQmlObject(`
import QtQuick
import Quickshell.Io
Process {
command: ${JSON.stringify(killCmd)}
running: true
onExited: (exitCode) => {
if (exitCode === 0) {
console.log("Process killed successfully:", ${pid})
} else {
console.warn("Failed to kill process:", ${pid}, "exit code:", exitCode)
}
destroy()
}
}
`, root);
root.killPid = pid
processKiller.command = ["bash", "-c", "kill " + pid]
processKiller.running = true
}
}
@@ -438,6 +426,21 @@ Singleton {
}
Process {
id: processKiller
command: ["bash", "-c", "kill " + root.killPid]
running: false
onExited: (exitCode) => {
if (exitCode === 0) {
console.log("Process killed successfully:", root.killPid)
} else {
console.warn("Failed to kill process:", root.killPid, "exit code:", exitCode)
}
root.killPid = 0
}
}
Timer {
id: processTimer