lock: also unlock keyring on unlock

This commit is contained in:
end-4
2025-09-30 23:07:04 +02:00
parent 599055b49f
commit 3c00805763
3 changed files with 37 additions and 0 deletions
@@ -268,6 +268,7 @@ Singleton {
}
property bool centerClock: true
property bool showLockedText: true
property bool unlockKeyring: true
}
property JsonObject media: JsonObject {
@@ -1,4 +1,5 @@
import qs
import qs.modules.common
import QtQuick
import Quickshell
import Quickshell.Services.Pam
@@ -55,6 +56,7 @@ Scope {
onCompleted: result => {
if (result == PamResult.Success) {
root.unlocked();
if (Config.options.lock.unlockKeyring) root.unlockKeyring();
} else {
root.showFailure = true;
GlobalStates.screenUnlockFailed = true;
@@ -64,4 +66,13 @@ Scope {
root.unlockInProgress = false;
}
}
function unlockKeyring() {
Quickshell.execDetached({
environment: ({
UNLOCK_PASSWORD: root.currentText
}),
command: ["bash", "-c", Quickshell.shellPath("scripts/keyring/unlock.sh")]
})
}
}