diff options
Diffstat (limited to 'etc/systemd/system')
| -rw-r--r-- | etc/systemd/system/autolock@.service | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/systemd/system/autolock@.service b/etc/systemd/system/autolock@.service new file mode 100644 index 0000000..806de0d --- /dev/null +++ b/etc/systemd/system/autolock@.service @@ -0,0 +1,13 @@ +# Enable with autolock@<username> +[Unit] +Description=Lock X session using slock for user %i +Before=sleep.target + +[Service] +User=%i +Environment="DISPLAY=:0" "XAUTHORITY=/home/%i/.config/x/authority" +ExecStartPre=/usr/bin/xset dpms force suspend +ExecStart=/usr/local/bin/slock + +[Install] +WantedBy=sleep.target |
