Files
linux-dotfiles/quickshell/ui/Clock.qml
2026-03-29 23:58:48 +02:00

29 lines
482 B
QML

import QtQuick
import "../constants"
// Clock
Text {
id: clock
color: Constants.colBlue
font {
family: Constants.fontFamily
pixelSize: Constants.fontSize
bold: true
}
function updateTime() {
text = Qt.formatDateTime(new Date(), "ddd, MMM dd - HH:mm");
}
Component.onCompleted: updateTime()
Timer {
interval: 1000
running: true
repeat: true
onTriggered: clock.updateTime()
}
}