mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 05:04:34 +00:00
Inhibit swaync when session is locked
This commit is contained in:
parent
c8d1e94c0f
commit
ffd352074f
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
|
||||||
general {
|
general {
|
||||||
unlock-cmd = killall -s SIGUSR1 hyprlock && dunstctl set-paused false
|
unlock-cmd = killall -s SIGUSR1 hyprlock
|
||||||
before_sleep_cmd = loginctl lock-session && dunstctl set-paused true && sleep 2
|
before_sleep_cmd = loginctl lock-session
|
||||||
ignore_dbus_inhibit = false
|
ignore_dbus_inhibit = false
|
||||||
ignore_systemd_inhibit = false;
|
ignore_systemd_inhibit = false;
|
||||||
}
|
}
|
||||||
|
@ -10,16 +10,15 @@ general {
|
||||||
# Warn about going idle (5 mins)
|
# Warn about going idle (5 mins)
|
||||||
listener {
|
listener {
|
||||||
timeout = 300
|
timeout = 300
|
||||||
# use hyprland notifications, in case dunst notifs are paused or whatever
|
# use hyprland notifications, in case regular notifs are paused or whatever
|
||||||
on-timeout = hyprctl notify 0 10000 "rgb(ff0000)" "fontsize:20 System going idle in 10 seconds..."
|
on-timeout = hyprctl notify 0 10000 "rgb(ff0000)" "fontsize:20 System going idle in 10 seconds..."
|
||||||
on-resume = hyprctl dismissnotify 1
|
on-resume = hyprctl dismissnotify 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Lock the session & disable dunst notifications
|
# Lock the session
|
||||||
listener {
|
listener {
|
||||||
timeout = 310
|
timeout = 310
|
||||||
on-timeout = loginctl lock-session && dunstctl set-paused true
|
on-timeout = loginctl lock-session
|
||||||
on-resume = dunstctl set-paused false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn off the screen after another 50s
|
# Turn off the screen after another 50s
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/home/itsdrike/.config/systemd/user/swaync-inhibit-lock.service
|
11
home/.config/systemd/user/swaync-inhibit-lock.service
Normal file
11
home/.config/systemd/user/swaync-inhibit-lock.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Inhibit swaync notifications on lock dbus event (using systemd-lock-handler)
|
||||||
|
Requisite=swaync.service
|
||||||
|
Before=lock.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/swaync-client --inhibitor-add screen-locker
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=lock.target
|
11
home/.config/systemd/user/swaync-inhibit-unlock.service
Normal file
11
home/.config/systemd/user/swaync-inhibit-unlock.service
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Uninhibit swaync notifications on unlock event
|
||||||
|
Requisite=swaync.service
|
||||||
|
After=unlock.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/swaync-client --inhibitor-remove screen-locker
|
||||||
|
Type=oneshot
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=unlock.target
|
|
@ -0,0 +1 @@
|
||||||
|
/home/itsdrike/.config/systemd/user/swaync-inhibit-unlock.service
|
Loading…
Reference in a new issue