Turn the lock screen into an unfolding glass dashboard

At rest the lock screen shows the date, glass clock and Now Playing. Typing
or clicking opens a glass card with avatar, name, status and password, then
wings unfold: weather (with the next forecasts) and system usage on the
left, notifications and media with Cava on the right, reusing the desktop
widget faces. Adds a Caps Lock warning, power controls behind a corner
button, and Dashboard and Notification previews settings. The screenshot
backdrop is now always fully blurred and dimmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mxandClaude Opus 5.5 committed 2026-10-15 18:07:46 +02:00
1 parent 4fa0c2c042
commit b96b0cb683
12 files changed
+1114 -330

No files matched your search

+87 -30
View File
@@ -1,8 +1,10 @@
pragma ComponentBehavior: Bound
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import "../../components"
import "../../services"
import "../../theme"
// Current conditions from wttr.in, refreshed every 30 minutes.
@@ -59,41 +61,96 @@ Face {
}
onLocationChanged: if (!fetch.running)
fetch.running = true
RowLayout {
// The next few forecasts appear below once the face is large enough.
readonly property var hourly: current && current.hourly ? current.hourly : []
readonly property bool showHourly: hourly.length > 0 && height >= 150 && width >= 260
function hourLabel(hour) {
if (ConfigService.ready && !ConfigService.data.bar.clock.use24Hour)
return (hour % 12 || 12) + (hour < 12 ? " AM" : " PM");
return (hour < 10 ? "0" : "") + hour + ":00";
}
ColumnLayout {
anchors.fill: parent
anchors.margins: 14
spacing: 12
GlassIcon {
size: Math.min(root.height - 28, 64)
glyphSize: size * 0.62
glyph: root.current ? root.glyph(root.current.code) : "󰖐"
fallback: "☁"
color: Theme.transparent
border.width: 0
spacing: 10
RowLayout {
Layout.fillWidth: true
Layout.fillHeight: true
spacing: 12
GlassIcon {
size: Math.min((root.showHourly ? root.height * 0.55 : root.height) - 28, 64)
glyphSize: size * 0.62
glyph: root.current ? root.glyph(root.current.code) : "󰖐"
fallback: "☁"
color: Theme.transparent
border.width: 0
}
ColumnLayout {
Layout.fillWidth: true
spacing: 0
Text {
text: root.current ? root.temperature(root.current.celsius) : "—"
color: Theme.text
font.pixelSize: Math.max(20, Math.min(root.height * 0.3, 44))
font.weight: Font.Light
}
Text {
text: root.current ? root.current.description : root.error || "Loading…"
color: Theme.text
font.pixelSize: 12
elide: Text.ElideRight
Layout.fillWidth: true
}
Text {
visible: !!root.current && root.height > 110
text: root.current ? root.current.place + " · feels " + root.temperature(root.current.feelsCelsius) : ""
color: Theme.textSecondary
font.pixelSize: 10
elide: Text.ElideRight
Layout.fillWidth: true
}
}
}
ColumnLayout {
RowLayout {
visible: root.showHourly
Layout.fillWidth: true
spacing: 0
Text {
text: root.current ? root.temperature(root.current.celsius) : "—"
color: Theme.text
font.pixelSize: Math.max(20, root.height * 0.3)
font.weight: Font.Light
}
Text {
text: root.current ? root.current.description : root.error || "Loading…"
color: Theme.text
font.pixelSize: 12
elide: Text.ElideRight
Layout.fillWidth: true
}
Text {
visible: !!root.current && root.height > 110
text: root.current ? root.current.place + " · feels " + root.temperature(root.current.feelsCelsius) : ""
color: Theme.textSecondary
font.pixelSize: 10
elide: Text.ElideRight
Layout.fillWidth: true
Repeater {
model: root.showHourly ? root.hourly : []
// Equal-width slots: a nested layout only grows when a child fills.
Item {
id: slot
required property var modelData
Layout.fillWidth: true
Layout.preferredWidth: 1
implicitHeight: slotColumn.implicitHeight
Column {
id: slotColumn
anchors.horizontalCenter: parent.horizontalCenter
spacing: 2
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: root.hourLabel(slot.modelData.hour)
color: Theme.textSecondary
font.pixelSize: 10
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
visible: Icons.available
text: Icons.available ? root.glyph(slot.modelData.code) : ""
font.family: Icons.family
color: Theme.text
font.pixelSize: 18
}
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: root.temperature(slot.modelData.celsius)
color: Theme.text
font.pixelSize: 11
font.weight: Font.DemiBold
}
}
}
}
}
}