mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-09-13 18:44:49 +00:00
Add services connected to systemd-lock-handler
This commit is contained in:
parent
aa039ff3b3
commit
f3b280a56e
4 changed files with 42 additions and 1 deletions
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=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
|
12
home/.config/systemd/user/swaync-inhibit-lock.service
Normal file
12
home/.config/systemd/user/swaync-inhibit-lock.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Inhibit swaync notifications on lock dbus event (using systemd-lock-handler)
|
||||
Requisite=swaync.service
|
||||
Before=lock.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/swaync-client --inhibitor-add screen-locker
|
||||
Slice=session-graphical.slice
|
||||
|
||||
[Install]
|
||||
WantedBy=lock.target
|
12
home/.config/systemd/user/swaync-inhibit-unlock.service
Normal file
12
home/.config/systemd/user/swaync-inhibit-unlock.service
Normal file
|
@ -0,0 +1,12 @@
|
|||
[Unit]
|
||||
Description=Uninhibit swaync notifications on unlock event
|
||||
Requisite=swaync.service
|
||||
After=unlock.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/swaync-client --inhibitor-remove screen-locker
|
||||
Slice=session-graphical.slice
|
||||
|
||||
[Install]
|
||||
WantedBy=unlock.target
|
Loading…
Add table
Add a link
Reference in a new issue