Skip to content

Instantly share code, notes, and snippets.

@davewongillies
Last active February 2, 2019 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davewongillies/94f3acbfa0e5fd0f2cca36e249a31e4a to your computer and use it in GitHub Desktop.
Save davewongillies/94f3acbfa0e5fd0f2cca36e249a31e4a to your computer and use it in GitHub Desktop.
Lock screen after suspend with i3lock and systemd
# /etc/systemd/system/wakelock.service
[Unit]
Description=Lock the screen on resume from suspend
Before=sleep.target suspend.target
[Service]
User=daveg
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock -i /home/daveg/Pictures/thinkpad-black.png -c 000000
[Install]
WantedBy=sleep.target suspend.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment