Last active
March 24, 2023 13:46
Star
You must be signed in to star a gist
How lock your system before suspend with openrc init via elogind using slock
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/sh | |
# | |
# /lib/elogind/system-sleep/lock.sh | |
# Lock before suspend integration with elogind | |
username=lerax | |
userhome=/home/$username | |
export XAUTHORITY="$userhome/.Xauthority" | |
export DISPLAY=":0.0" | |
case "${1}" in | |
pre) | |
su $username -c "/usr/bin/slock" & | |
sleep 1s; | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thak you very much, that is what I was looking for.