updated config

This commit is contained in:
2026-01-04 22:00:21 -06:00
parent 6618497090
commit 9d5e396152
9 changed files with 111 additions and 17 deletions

View File

@@ -115,12 +115,35 @@ Item {
// ------ Start update ------
//
function startDoSystemUpdate() {
const cmd = root.customUpdater.cmdDoSystemUpdate || root.updater.cmdDoSystemUpdate || "echo 'No update cmd found.'"
const updateCmd = root.customUpdater.cmdDoSystemUpdate || root.updater.cmdDoSystemUpdate || "echo 'No update cmd found.'"
const ipcCmd = "qs -c noctalia-shell ipc call plugin:update-count check"
const combinedCmd = updateCmd + " && " + ipcCmd
const term = root.updateTerminalCommand.trim();
const fullCmd = (term.indexOf("{}") !== -1) ? term.replace("{}", combinedCmd) : term + " " + combinedCmd;
const fullCmd = (term.indexOf("{}") !== -1) ? term.replace("{}", cmd) : term + " " + cmd;
doSystemUpdate.command = ["sh", "-c", fullCmd]
doSystemUpdate.running = true;
Quickshell.execDetached(["sh", "-c", fullCmd]);
Logger.i("UpdateCount", `Executed update command: ${fullCmd}`);
}
Process {
id: doSystemUpdate
}
//
// ------ IPC ------
//
IpcHandler {
target: "plugin:update-count"
function check(): void {
root.startGetNumUpdates()
}
function run(): void {
root.startDoSystemUpdate()
}
}
}