Add services connected to systemd-lock-handler

This commit is contained in:
ItsDrike 2025-09-04 16:19:36 +02:00
parent aa039ff3b3
commit f3b280a56e
Signed by: ItsDrike
GPG key ID: FA2745890B7048C0
4 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,17 @@
[Unit]
Description=Run hyprlock screenlocker on lock dbus event (using systemd-lock-handler)
Requisite=graphical-session.target
# If hyprlock exits cleanly, enter a 'unlock' target
OnSuccess=unlock.target
# When lock is stopped, stop this unit too
PartOf=lock.target
[Service]
ExecStart=/usr/bin/hyprlock
StandardOutput=journal
ExecStopPost=/bin/loginctl unlock-session
Restart=on-failure
Slice=session-graphical.slice
[Install]
WantedBy=lock.target