diff --git a/systemd/user/swayidle.service b/systemd/user/swayidle.service new file mode 100644 index 0000000..abbc2a7 --- /dev/null +++ b/systemd/user/swayidle.service @@ -0,0 +1,15 @@ +[Unit] +Description=Idle manager for Wayland +Documentation=man:swayidle(1) +PartOf=graphical-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/swayidle -w \ + timeout 6000 'swaymsg "output * dpms off"' \ + resume 'swaymsg "output * dpms on"' \ + lock 'swaylock -f -s center -i "~/.config/sway/lockscreen.png"' \ + before-sleep 'swaylock -f -s center -i "~/.config/sway/lockscreen.png"' + +[Install] +WantedBy=sway-session.target