xautolock-systemd/xautolock@.service

14 lines
222 B
SYSTEMD

[Unit]
Description=Lock screen before suspend
Before=sleep.target
[Service]
User=%I
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/xautolock -locknow
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target