Use systemctl sleep for automatic suspend mode selection

This commit is contained in:
SebastianStork 2025-03-10 18:45:18 +01:00
parent 1b27e93c03
commit 86d31cc3c6
5 changed files with 6 additions and 17 deletions

View file

@ -8,7 +8,6 @@
# l = locked
# Variables
$suspend = systemctl suspend${lib.optionalString config.myConfig.hibernation.enable "-then-hibernate"}
$play-pause = playerctl --ignore-player=firefox play-pause
$play-next = playerctl --ignore-player=firefox next
$play-previous = playerctl --ignore-player=firefox previous
@ -62,9 +61,9 @@
bindrl = SUPER CONTROL, Q, exit,
bindrl = SUPER CONTROL, P, exec, poweroff
bindrl = SUPER CONTROL, R, exec, reboot
${lib.optionalString config.myConfig.hibernation.enable "bindrl = SUPER CONTROL, H, exec, systemctl hibernate"}
bindrl = SUPER CONTROL, S, exec, $suspend
bindl = , switch:on:Lid Switch, exec, $suspend
bindrl = SUPER CONTROL, H, exec, systemctl hibernate
bindrl = SUPER CONTROL, S, exec, systemctl sleep
bindl = , switch:on:Lid Switch, exec, systemctl sleep
bindrl = SUPER CONTROL, L, exec, loginctl lock-session
bindrl = SUPER CONTROL, B, exec, sleep 1 && hyprctl dispatch dpms off