dotfiles/home/Scripts/swayidle.sh
2020-04-07 13:29:13 +03:00

13 lines
393 B
Bash
Executable file

#!/bin/bash
swaylock="$HOME/Scripts/swaylock.sh"
screenon="swaymsg 'output * dpms on'"
screenoff="swaymsg 'output * dpms off'"
swayidle \
lock "$swaylock" \
unlock "pkill -9 swaylock" \
timeout 300 "lqsd -d" \
resume "lqsd -r" \
timeout 600 "loginctl lock-session" \
timeout 610 "$screenoff" \
resume "$screenon; lqsd -r" \
before-sleep "playerctl pause; loginctl lock-session)"