dotfiles/.scripts/swayidle.sh

13 lines
412 B
Bash
Raw Normal View History

2023-09-26 17:12:28 +02:00
#!/bin/sh
# Edit /etc/elogind/logind.conf and change these lines:
# HandleLidSwitch=suspend -> HandleLidSwitch=lock
# HandleLidSwitchExternalPower=suspend -> HandleLidSwitchExternalPower=lock
swayidle -w \
timeout 300 "$HOME/.scripts/swaylock.sh" \
timeout 360 'hyprctl dispatch dpms off' \
resume 'hyprctl dispatch dpms on' \
before-sleep "$HOME/.scripts/swaylock.sh" \
lock "$HOME/.scripts/swaylock.sh"