first commit
This commit is contained in:
34
widgets/bgDate/BgDate.qml
Normal file
34
widgets/bgDate/BgDate.qml
Normal file
@@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "../../config" as Cfg
|
||||
|
||||
PanelWindow {
|
||||
required property var modelData
|
||||
screen: modelData
|
||||
color: "transparent"
|
||||
|
||||
anchors { top: true; bottom: true; left: true; right: true }
|
||||
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
WlrLayershell.exclusiveZone: -1
|
||||
mask: Region {}
|
||||
|
||||
Text {
|
||||
id: clockText
|
||||
anchors.centerIn: parent
|
||||
color: Cfg.Config.theme.clockText
|
||||
styleColor: Cfg.Config.theme.clockShadow
|
||||
font.pixelSize: 100
|
||||
font.weight: Font.Thin
|
||||
style: Text.Outline
|
||||
text: new Date().toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
}
|
||||
|
||||
Timer {
|
||||
interval: 1000
|
||||
running: true
|
||||
repeat: true
|
||||
onTriggered: clockText.text = new Date().toLocaleTimeString(Qt.locale(), "HH:mm")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user