Update swaylock and swayidle settings

main
Ensar Sarajčić 2024-08-29 10:16:09 +02:00
parent 69664b471e
commit 12c4382e4b
2 changed files with 8 additions and 9 deletions

View File

@ -1,11 +1,10 @@
# Define locker script # Define locker script
set $locker 'swaylock' bindsym $alt+L exec 'swaylock'
bindsym $alt+L exec $locker
# IDLE CONFIG # IDLE CONFIG
exec swayidle -w \ exec swayidle -w \
timeout 300 $locker \ timeout 300 'swaylock' \
timeout 330 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ timeout 330 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout 600 'systemctl suspend' \ timeout 600 'systemctl suspend' \
before-sleep $locker \ before-sleep 'swaylock; playerctl pause'
before-sleep 'playerctl pause'

View File

@ -3,10 +3,10 @@ set $mode_system "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) r
# System mode - system menu # System mode - system menu
mode $mode_system { mode $mode_system {
bindsym l exec --no-startup-id $locker, mode "default" bindsym l exec --no-startup-id swaylock, mode "default"
bindsym e exec --no-startup-id swaymsg exit, mode "default" bindsym e exec --no-startup-id swaymsg exit, mode "default"
bindsym s exec --no-startup-id $locker && systemctl suspend, mode "default" bindsym s exec --no-startup-id swaylock && systemctl suspend, mode "default"
bindsym h exec --no-startup-id $locker && systemctl hibernate, mode "default" bindsym h exec --no-startup-id swaylock && systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default" bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default" bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"