quickshell fixes
This commit is contained in:
parent
9786305a83
commit
82aee7b018
10 changed files with 96 additions and 29 deletions
28
modules/styling/quickshell/bar/time/Time.qml
Normal file
28
modules/styling/quickshell/bar/time/Time.qml
Normal file
|
@ -0,0 +1,28 @@
|
|||
// with this line our type becomes a singleton
|
||||
pragma Singleton
|
||||
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import QtQuick
|
||||
|
||||
// your singletons should always have Singleton as the type
|
||||
Singleton {
|
||||
property string time
|
||||
|
||||
Process {
|
||||
id: dateProc
|
||||
command: ["date"]
|
||||
running: true
|
||||
|
||||
stdout: SplitParser {
|
||||
onRead: data => time = data
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: dateProc.running = true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue