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