aboutsummaryrefslogtreecommitdiff
path: root/modules/system/quickshell/LockContext.qml
diff options
context:
space:
mode:
authorLeander Scherer <leander@schererleander.de>2026-06-29 21:08:42 +0200
committerLeander Scherer <leander@schererleander.de>2026-06-29 21:22:33 +0200
commit67b7245bf96cf954d90719e800cf9618ffaa4feb (patch)
tree2723c3db278840150985cdc630487ff175d330d9 /modules/system/quickshell/LockContext.qml
parentd4fa3d0533c8dac688e38413403815de1802339e (diff)
chore: cleanup sway, quickshell
Diffstat (limited to 'modules/system/quickshell/LockContext.qml')
-rw-r--r--modules/system/quickshell/LockContext.qml59
1 files changed, 0 insertions, 59 deletions
diff --git a/modules/system/quickshell/LockContext.qml b/modules/system/quickshell/LockContext.qml
deleted file mode 100644
index ea32a57..0000000
--- a/modules/system/quickshell/LockContext.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-import QtQuick
-import Quickshell
-import Quickshell.Services.Pam
-
-Scope {
- id: root
- signal unlocked
- signal failed
-
- property string currentText: ""
- property bool unlockInProgress: false
- property string pamMessage: ""
- property bool pamError: false
-
- onCurrentTextChanged: {
- pamError = false;
- pamMessage = "";
- }
-
- function tryUnlock() {
- if (currentText === "" || unlockInProgress)
- return;
- unlockInProgress = true;
- pam.start();
- }
-
- function reset() {
- currentText = "";
- pamError = false;
- pamMessage = "";
- unlockInProgress = false;
- }
-
- PamContext {
- id: pam
- configDirectory: "pam"
- config: "password.conf"
-
- onPamMessage: {
- root.pamMessage = pam.message;
- root.pamError = pam.messageIsError;
- if (this.responseRequired) {
- this.respond(root.currentText);
- }
- }
-
- onCompleted: result => {
- if (result == PamResult.Success) {
- root.currentText = "";
- root.unlocked();
- } else {
- root.currentText = "";
- root.pamError = true;
- root.failed();
- }
- root.unlockInProgress = false;
- }
- }
-}