Created
February 13, 2019 11:32
-
-
Save ryukinix/bbd4b28f620b5c88fefa2beb57e91ac7 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/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