Last active
August 27, 2022 16:43
-
-
Save txtyash/2e405fb559c25682fa8730733c79adff to your computer and use it in GitHub Desktop.
Lock screen on sleep/hibernate with slock. Place this file under /etc/systemd/system/slock.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Lock X session using slock for user %i | |
Before=sleep.target | |
[Service] | |
User=zim | |
Environment=DISPLAY=:0 | |
ExecStartPre=/usr/bin/xset dpms force suspend | |
ExecStart=/usr/bin/slock | |
[Install] | |
WantedBy=suspend.target,hibernate.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't forget to change the user name to your's