import QtQuick
import QtQuick.Layouts
import Quickshell
import qs.Commons
import qs.Services.Keyboard
import qs.Widgets
Rectangle {
id: root
property date currentTime: new Date()
width: Math.min(700, parent.width - 48)
height: 380
anchors.centerIn: parent
radius: 12
color: "@SURFACE@"
border.color: "@OUTLINE@"
border.width: 1
Timer {
interval: 1000
running: true
repeat: true
onTriggered: root.currentTime = new Date()
}
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.margins: 30
spacing: 14
Image { source: "@LOGO@"; Layout.preferredWidth: 32; Layout.preferredHeight: 32; smooth: true }
NText {
text: "NixDaemon"
font.family: "DMMono Nerd Font"
pointSize: 17
font.weight: Font.Medium
color: "@TEXT@"
Layout.fillWidth: true
}
Rectangle {
Layout.preferredWidth: 90
Layout.preferredHeight: 28
radius: 4
color: "@OVERLAY@"
NText {
anchors.centerIn: parent
text: "LOCKED"
font.family: "DMMono Nerd Font"
pointSize: 9
font.letterSpacing: 1.5
color: "@ROSE@"
}
}
}
Rectangle {
anchors.top: parent.top
anchors.topMargin: 88
anchors.left: parent.left
anchors.right: parent.right
anchors.leftMargin: 30
anchors.rightMargin: 30
height: 1
color: "@OUTLINE@"
}
NText {
anchors.horizontalCenter: parent.horizontalCenter
y: 110
text: Qt.formatDateTime(root.currentTime, "HH:mm")
font.family: "DMMono Nerd Font"
pointSize: 42
font.letterSpacing: 2
color: "@FOAM@"
}
NText {
anchors.horizontalCenter: parent.horizontalCenter
y: 178
text: Qt.formatDateTime(root.currentTime, "dddd, d MMMM yyyy")
font.family: "DMMono Nerd Font"
pointSize: 11
color: "@SUBTLE@"
}
NText {
anchors.left: parent.left
anchors.leftMargin: 48
y: 229
text: Quickshell.env("USER") + " · Password"
font.family: "DMMono Nerd Font"
pointSize: 11
color: "@TEXT@"
}
NText {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 24
text: LockKeysService.capsLockOn ? "Caps Lock is on" : "Enter to unlock"
font.family: "DMMono Nerd Font"
pointSize: 10
color: LockKeysService.capsLockOn ? "@GOLD@" : "@SUBTLE@"
}
}