Skip to content

Instantly share code, notes, and snippets.

@balazs4
Created December 3, 2024 21:57
Show Gist options
  • Select an option

  • Save balazs4/a4d1eed9f84d3de5d93d29d6902975ab to your computer and use it in GitHub Desktop.

Select an option

Save balazs4/a4d1eed9f84d3de5d93d29d6902975ab to your computer and use it in GitHub Desktop.
# sudo systemctl enable slock@balazs4.service
[Unit]
Description=Lock X session using slock for user %i
Before=sleep.target
[Service]
User=%i
Type=simple
Environment=DISPLAY=:0
ExecStart=/usr/bin/slock
ExecStartPost=/usr/bin/sleep 1
[Install]
WantedBy=sleep.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment