nova-shell/modules/BackgroundOverlay.qml

84 lines
2.2 KiB
QML

import QtQuick
import Quickshell
import Quickshell.Wayland
import "." as M
PanelWindow {
id: root
required property var screen
color: "transparent"
WlrLayershell.layer: WlrLayer.Background
WlrLayershell.exclusiveZone: -1
WlrLayershell.namespace: "nova-background-overlay"
mask: Region {}
anchors.top: true
anchors.left: true
anchors.right: true
anchors.bottom: true
SystemClock {
id: clock
precision: SystemClock.Seconds
}
Column {
anchors.centerIn: parent
spacing: 8
Row {
anchors.horizontalCenter: parent.horizontalCenter
Text {
text: Qt.formatDateTime(clock.date, "HH")
color: M.Theme.base05
opacity: 0.7
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.bold: true
}
Text {
id: colon
text: ":"
color: M.Theme.base05
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.bold: true
SequentialAnimation on opacity {
loops: Animation.Infinite
NumberAnimation {
to: 0.1
duration: 1000
easing.type: Easing.InOutSine
}
NumberAnimation {
to: 0.7
duration: 1000
easing.type: Easing.InOutSine
}
}
}
Text {
text: Qt.formatDateTime(clock.date, "mm")
color: M.Theme.base05
opacity: 0.7
font.pixelSize: 72
font.family: M.Theme.fontFamily
font.bold: true
}
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, dd MMMM yyyy")
color: M.Theme.base05
opacity: 0.5
font.pixelSize: 18
font.family: M.Theme.fontFamily
}
}
}