Move clock logic to Time.qml
This commit is contained in:
25
user/Time.qml
Normal file
25
user/Time.qml
Normal file
@@ -0,0 +1,25 @@
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
property string 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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user