Use SystemClock support library instead of date

This commit is contained in:
2025-11-10 14:11:51 +01:00
parent 565d2eebfd
commit 943036a507

View File

@@ -1,27 +1,19 @@
pragma Singleton
import Quickshell
import Quickshell.Io
import QtQuick
Singleton {
id: root
property string time
Process {
id: dateProc
command: ["date"]
running: true
stdout: StdioCollector {
onStreamFinished: root.time = this.text
}
Singleton {
id: root
readonly property string time: {
Qt.formatDateTime(clock.date, "hh:mm:ss ddd dd.MM.yyyy")
}
Timer {
intervall: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
SystemClock {
id: clock
precision: SystemClock.Seconds
}
}
}