dotfiles/.scripts/swayidle.sh
2023-09-26 17:12:28 +02:00

12 lines
412 B
Bash
Executable file

#!/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"