From 8a551339cbfaf106ac7d6f1ca5230196be539167 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 8 Sep 2025 20:00:22 +0200 Subject: ... --- accounts/gkleen@sif/shell/quickshell/Lockscreen.qml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'accounts/gkleen@sif/shell/quickshell/Lockscreen.qml') diff --git a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml index cc82a275..8e739359 100644 --- a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml +++ b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml @@ -2,6 +2,9 @@ import Quickshell import Quickshell.Wayland import Quickshell.Io import Quickshell.Services.Pam +import Quickshell.Services.Mpris +import Custom as Custom +import qs.Services import QtQml Scope { @@ -38,9 +41,19 @@ Scope { WlSessionLock { id: lock - onLockedChanged: { + onLockStateChanged: { if (!locked && pam.active) pam.abort(); + + if (locked) { + Custom.KeePassXC.lockAllDatabases(); + Array.from(Mpris.players.values).forEach(player => { + if (player.canPause && player.isPlaying) + player.pause(); + }); + // Custom.Systemd.stopUserUnit("gpg-agent.service", "replace"); + GpgAgent.reloadAgent(); + } } WlSessionLockSurface { -- cgit v1.2.3