[Unit]
Description=Screen lock
Before=sleep.target

[Service]
User=%I
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/local/bin/lock
ExecStartPost=/usr/bin/sleep 1

[Install]
WantedBy=sleep.target
