-
-
Save ArdaXi/5013361 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
command -v xlock > /dev/null 2>/dev/null || exec notify-send -u critical 'xlock is missing' | |
exec xlock -mode blank |
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 xlock | |
After=sleep.target | |
[Service] | |
User=%I | |
Environment=DISPLAY=:0 | |
ExecStart=path/to/lock | |
[Install] | |
WantedBy=sleep.target |
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
#!/bin/bash | |
(sleep 1 && exec sudo systemctl suspend) & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment