Move clock logic to Time.qml

This commit is contained in:
2025-11-10 14:00:04 +01:00
parent b154ccc549
commit 07e21399d0

View File

@@ -1,10 +1,7 @@
import Quickshell
import Quickshell.Io
import QTQuick
Scope {
id: root
property string time
Time { id: timeSource }
Variants {
model: Quickshell.screens
@@ -23,25 +20,8 @@ Scope {
ClockWidget {
anchors.centerIn: parent
text: root.time
time: timeSource.time
}
}
}
Process {
id: dateProc
command: ["date"]
running: true
stdout StdioCollector {
onStreamFinished: root.time = this.text
}
}
Timer {
intervall: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
}
}