[Unit] Description=i3locker [Service] Type=forking Environment=DISPLAY=:0 User=nothing ExecStart=/usr/bin/i3lock -c 000000 [Install] WantedBy=sleep.target suspend.target Before=sleep.traget suspend.target