-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswayidle.service
21 lines (19 loc) · 909 Bytes
/
swayidle.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Unit]
Description=Idle manager for Wayland
Documentation=man:swayidle(1)
PartOf=graphical-session.target
[Service]
Type=simple
Restart=on-failure
RestartSec=1
TimeoutStopSec=10
ExecStart=/usr/bin/swayidle -w \
timeout 300 'swaylock -S -F -e --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2' \
timeout 305 'swaymsg "output * power off"' \
timeout 5 'if pgrep -x swaylock; then swaymsg "output * power off"; fi' \
resume 'swaymsg "output * power on"' \
after-resume 'swaymsg "output * power on"' \
before-sleep 'playerctl pause' \
before-sleep 'swaylock -S -F -e --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2'
[Install]
WantedBy=sway-session.target