blob: 743e785d396fd07328bbfbf2e5d4ddd5dce71ba8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
pragma Singleton
import Quickshell
import Quickshell.Io
import QtQuick
Singleton {
property string time;
property string date;
Process {
id: dateProc
command: ["date", "+%a %e %b|%R"]
running: true
stdout: SplitParser {
onRead: data => {
date = data.split("|")[0]
time = data.split("|")[1]
}
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
}
}
|