Files
glassMxrph/quickshell/settings/pages/Lock.qml
T
mxandClaude Opus 5.5 99e64a7713 Add glassMxrph shell sources
Initial commit of the Quickshell desktop suite: bar, dock, launcher,
settings, Control Center, dashboard, OSD, lock screen, desktop widgets,
plugin host with the vendored Noctalia/Omarchy compatibility layer,
helpers, packaging, tests and phase documentation.

Includes the optimization work so far: usage widgets and dashboard
gauges no longer animate continuously, desktop widgets pause while
covered, system controls stop flickering on background polls, dock app
matching uses an indexed catalog, and workspace ghosts are created only
for occupied slots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:36:17 +02:00

119 lines
4.3 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 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: "Now Playing"
icon: "󰝚"
setting: "lock.media"
}
PreferenceToggle {
label: "Power buttons"
description: "Sleep, Restart and Shut Down below the password field"
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."
}
}
}