[Unit]
Description=Idle manager for Wayland
Documentation=man:swayidle(1)
PartOf=graphical-session.target

[Service]
Type=simple
ExecStart=/usr/bin/swayidle -w \
    timeout 600  'echo RELOADAGENT | gpg-connect-agent; swaylock -f' \
    timeout 60   'swaymsg "output * dpms off"' \
    resume       'swaymsg "output * dpms on"' \
    before-sleep 'echo RELOADAGENT | gpg-connect-agent; swaylock -f'

[Install]
WantedBy=sway-session.target
