1
0
Fork 0
dotfiles/files/.config/systemd/user/swayidle.service

16 lines
490 B
Desktop File

[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 30 'if pgrep swaylock; then swaymsg "output * dpms off"; fi' \
resume 'if pgrep swaylock; then swaymsg "output * dpms on"; fi' \
before-sleep 'echo RELOADAGENT | gpg-connect-agent; swaylock -f'
[Install]
WantedBy=sway-session.target