getting things done

This commit is contained in:
2026-06-14 15:01:16 +01:00
parent 6e84d0ca21
commit 269b806af5
6 changed files with 247 additions and 9 deletions

46
Services/Time.qml Normal file
View File

@@ -0,0 +1,46 @@
// Time.qml
// with this line our type becomes a Singleton
pragma Singleton
import QtQuick
import Quickshell
import Quickshell.Io
// your singletons should always have Singleton as the type
Singleton {
id: root
property string date
property string time
Process {
id: timeProc
command: ["date", "+%T"]
running: true
stdout: StdioCollector {
onStreamFinished: root.time = this.text
}
}
Process {
id: dateProc
command: ["date"]
running: true
stdout: StdioCollector {
onStreamFinished: root.time = this.text
}
}
Timer {
interval: 1000
repeat: true
running: true
onTriggered: timeProc.running = true
}
}