https://bugs.kde.org/show_bug.cgi?id=481069

--- Comment #36 from sd <mail@binbash.rocks> ---
for whom this function is also sorely missed: I stumbled over a workaround
which works pretty well (for me):
https://www.baeldung.com/linux/run-script-session-locked-unlocked

while this is not a fix for this issue it at least let me do what I need until
this bug is resolved.. I still think it would be great having the functionality
back as it was in Plasma < 6.

TL;DR
add the following in the autostart of your display manager (here KDE obviously)
and adjust it ofc.
(if it does not work read that article as the dbus command might is different
or changed etc)


#!/bin/bash
#####################################################################
#
# run actions when screen locks/unlocks
#
# source:
#  https://www.baeldung.com/linux/run-script-session-locked-unlocked
#
#####################################################################

while read line 
do
    case "$line" in
        *"{'LockedHint': <true>}"*) # screen locked
            true # replace with something meaningful ;)
        ;;
        *"{'LockedHint': <false>}"*) # screen unlocked
            ~/scripts/kpxc-unlock.sh; notify-send -a "Screen unlocked" -i
keepassxc -t 3000 "KeepassX unlock triggered"
        ;;
    esac
done < <(gdbus monitor -y -d org.freedesktop.login1)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to