JeffLabonte
11/18/2018 - 9:10 PM

Lock screen after suspend with i3lock and systemd

Lock screen after suspend with i3lock and systemd

# file /etc/systemd/system/wakelock.service

[Unit]
Description=Lock the screen on resume from suspend

[Service]
User=victor
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock

[Install]
WantedBy=sleep.target
WantedBy=suspend.target