Port the AGS widgets into the shell as plugins

This commit is contained in:
2026-09-20 00:09:41 -04:00
parent c5434026a8
commit 0c422e7345
31 changed files with 1740 additions and 17 deletions
@@ -0,0 +1,32 @@
import QtQuick
import Quickshell.Io
Item {
id: root
property string command: ""
property int intervalMs: 2000
property bool value: false
property bool polling: false
function refresh() {
if (root.command.length > 0 && !probe.running) probe.running = true
}
Process {
id: probe
command: ["bash", "-c", root.command]
stdout: StdioCollector {
onStreamFinished: root.value = text.trim() === "on"
}
}
Timer {
interval: root.intervalMs
running: root.polling
repeat: true
onTriggered: root.refresh()
}
onPollingChanged: if (root.polling) root.refresh()
}