Skip to content

Instantly share code, notes, and snippets.

@JeffLabonte
Created November 18, 2018 21:10
Show Gist options
  • Save JeffLabonte/a9cd09deb3d03415636be582ad3018d6 to your computer and use it in GitHub Desktop.
Save JeffLabonte/a9cd09deb3d03415636be582ad3018d6 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment