Files
mxandClaude Opus 5.5 b96b0cb683 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>
2026-10-15 18:07:46 +02:00

132 lines
4.9 KiB
QML

import QtQuick
import QtQuick.Layouts
import "../controls"
import "../../components"
import "../../lock"
import "../../theme"
import "../../services"
SettingsPage {
SettingsSection {
SettingRow {
title: "Lock screen"
description: "Check your password below before locking for the first time."
icon: "󰌾"
GlassButton {
objectName: "lockPreview"
text: "Preview"
onClicked: LockState.preview()
}
GlassButton {
objectName: "lockNow"
text: "Lock now"
accented: true
onClicked: LockState.lock()
}
}
SettingRow {
title: "Test password"
description: LockState.testResult === "accepted" ? "Password accepted. Unlocking will work." : LockState.testResult === "rejected" ? "Password rejected. Check it, or the PAM service below." : LockState.testResult === "error" ? "Authentication is unavailable with this PAM service." : "Runs the same authentication as the lock screen, without locking."
icon: "󰌆"
GlassTextField {
id: testPassword
objectName: "lockTestPassword"
Layout.preferredWidth: 200
echoMode: TextInput.Password
placeholderText: "Password"
enabled: !LockState.busy
onAccepted: {
LockState.test(text);
clear();
}
}
GlassButton {
text: LockState.busy ? "Checking…" : "Test"
enabled: !LockState.busy && testPassword.text !== ""
onClicked: {
LockState.test(testPassword.text);
testPassword.clear();
}
}
}
PreferenceToggle {
label: "Use for Lock buttons"
description: "Control Center and the power menu lock with this screen instead of an external locker"
icon: "󰌾"
setting: "lock.enabled"
}
}
SettingsSection {
title: "Appearance"
PreferenceChoice {
label: "Backdrop"
description: "Your wallpaper, like macOS, or a heavily blurred snapshot of the desktop taken when locking"
icon: "󰸉"
setting: "lock.backdrop"
choices: ["wallpaper", "screenshot"]
}
PreferenceToggle {
label: "Liquid glass"
description: "Refraction, dispersion and highlights rendered on the lock screen itself, using your HyprGlass values"
icon: "󰂵"
setting: "lock.glass"
}
PreferenceToggle {
label: "Dashboard"
description: "When you start typing, weather and system usage unfold on the left, notifications and media on the right"
icon: "󰕮"
setting: "lock.dashboard"
}
PreferenceToggle {
label: "Now Playing"
description: "Below the clock, and as a media card in the dashboard"
icon: "󰝚"
setting: "lock.media"
}
PreferenceToggle {
label: "Notification previews"
description: "Show message text in the dashboard, not just the app and title"
icon: "󰂚"
setting: "lock.notificationPreviews"
}
PreferenceToggle {
label: "Power buttons"
description: "Sleep, Restart and Shut Down behind a button in the corner"
icon: "󰐥"
setting: "lock.powerButtons"
}
}
SettingsSection {
title: "Authentication"
SettingRow {
title: "PAM service"
description: "Blank uses the bundled password check (pam_unix). Or name a service in /etc/pam.d, such as hyprlock."
icon: "󰒃"
setting: "lock.pamService"
GlassTextField {
Layout.preferredWidth: 160
text: LockState.options.pamService
placeholderText: "bundled"
onEditingFinished: ConfigService.setValue("lock.pamService", text.trim())
}
}
}
SettingsSection {
title: "Keybinds and recovery"
padded: true
Text {
Layout.fillWidth: true
wrapMode: Text.Wrap
color: Theme.text
font.family: "monospace"
font.pixelSize: 11
textFormat: Text.PlainText
text: "bind = SUPER, L, exec, glassmxrph lock\n# hypridle: general { lock_cmd = glassmxrph lock }"
}
SettingNote {
Layout.leftMargin: 0
text: "If the shell ever stops while locked, Hyprland keeps the session locked. From another TTY (Ctrl+Alt+F3): hyprctl --instance 0 'keyword misc:allow_session_lock_restore 1', then start glassMxrph again and lock/unlock once."
}
}
}