blob: 8a99bfb22e1c3c1e3e64117337a11efd396957ed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
[Unit]
Description=Idle manager for Wayland (lock + DPMS + before-sleep)
PartOf=graphical-session.target
After=graphical-session.target
ConditionEnvironment=WAYLAND_DISPLAY
[Service]
Type=simple
ExecStart=/usr/bin/swayidle -w \
timeout 300 'swaylock -f -e -c 282828' \
timeout 360 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' \
before-sleep 'playerctl -a pause; swaylock -f -e -c 282828' \
lock 'swaylock -f -e -c 282828'
Restart=on-failure
RestartSec=2s
[Install]
WantedBy=sway-session.target
|