nixfiles/quickshell/shell.qml
2025-12-04 19:12:49 -08:00

48 lines
745 B
QML

import Quickshell
import Quickshell.Io
import QtQuick
Scope {
id: root
property string time
Variants {
model: Quickshell.screens
PanelWindow {
required property var modelData
screen: modelData
anchors {
top: true
left: true
right: true
}
implicitHeight: 30
Text {
font.family: "M+2 Nerd Font Regular"
anchors.centerIn: parent
text: root.time
}
}
}
Process {
id: dateProc
command: ["date", "+%F %T %Z"]
running: true
stdout: StdioCollector {
onStreamFinished: root.time = this.text
}
}
Timer {
interval: 1000
running: true
repeat: true
onTriggered: dateProc.running = true
}
}