Skip to content

Instantly share code, notes, and snippets.

@nikhan
Created April 29, 2017 22:01
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 nikhan/e536024362cdb392dbd2431acf84432b to your computer and use it in GitHub Desktop.
Save nikhan/e536024362cdb392dbd2431acf84432b to your computer and use it in GitHub Desktop.
ubuntu/macbook - lock i3 on suspend
# source: https://bbs.archlinux.org/viewtopic.php?pid=1170536#p1170536 by 65kid
#
[Unit]
Description=i3lock
Before=sleep.target
[Service]
User=nik
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock
[Install]
WantedBy=sleep.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment