update module

This commit is contained in:
Zacharias-Brohn
2025-10-13 21:41:37 +02:00
parent 5297e81ca6
commit f08ef0ddb6
5 changed files with 167 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
pragma Singleton
pragma ComponentBehavior: Bound
import QtQuick
import Quickshell
import Quickshell.Io
import qs.Modules
Singleton {
property int availableUpdates: 0
Timer {
interval: 1
running: true
repeat: true
onTriggered: {
console.log("Checking for updates...")
updatesProc.running = true
interval = 60000
}
}
Process {
id: updatesProc
running: false
command: ["checkupdates"]
stdout: StdioCollector {
onStreamFinished: {
const output = this.text
const lines = output.trim().split("\n")
console.log("Available updates:", lines)
availableUpdates = lines.length
}
}
}
}