forked from Shinonome/dots-hyprland
lock: also unlock keyring on unlock
This commit is contained in:
@@ -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")]
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user