mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-25 12:44:35 +00:00
Rewrite the hyprlock (systemd-lock-handler) service
This commit is contained in:
parent
ffd352074f
commit
4b37fb8fb3
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
general {
|
general {
|
||||||
unlock-cmd = killall -s SIGUSR1 hyprlock
|
|
||||||
before_sleep_cmd = loginctl lock-session
|
before_sleep_cmd = loginctl lock-session
|
||||||
ignore_dbus_inhibit = false
|
ignore_dbus_inhibit = false
|
||||||
ignore_systemd_inhibit = false;
|
ignore_systemd_inhibit = false;
|
||||||
|
|
17
home/.config/systemd/user/hyprlock.service
Normal file
17
home/.config/systemd/user/hyprlock.service
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run hyprlock screenlocker on lock dbus event (using systemd-lock-handler)
|
||||||
|
Requisite=wm-ready.target
|
||||||
|
# if hyprlock exists cleanly, enter a 'unlock' target
|
||||||
|
OnSuccess=unlock.target
|
||||||
|
# When lock.target is stopped, stop this unit too
|
||||||
|
PartOf=lock.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/hyprlock
|
||||||
|
StandardOutput=journal
|
||||||
|
ExecStop=/bin/kill -s SIGUSR1 $MAINPID
|
||||||
|
ExecStopPost=/bin/loginctl unlock-session
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=lock.target
|
1
home/.config/systemd/user/lock.target.wants/hyprlock.service
Symbolic link
1
home/.config/systemd/user/lock.target.wants/hyprlock.service
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/itsdrike/.config/systemd/user/hyprlock.service
|
|
@ -1 +0,0 @@
|
||||||
/home/itsdrike/.config/systemd/user/systemd-lock-handler-hyprlock.service
|
|
|
@ -1,15 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Run hyprlock screenlocker on lock dbus event (using systemd-lock-handler)
|
|
||||||
# if swaylock exists cleanly, unlock this session
|
|
||||||
OnSuccess=unlock.target
|
|
||||||
# When lock.target is stopped, stop this too
|
|
||||||
PartOf=lock.target
|
|
||||||
# Delay lock.target until this service is ready
|
|
||||||
After=lock.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/stdbuf -oL /usr/bin/hyprlock
|
|
||||||
Restart=on-failure
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=lock.target
|
|
Loading…
Reference in a new issue