Created
May 8, 2014 16:12
-
-
Save ShivamMistry/b55b5a9952b347865954 to your computer and use it in GitHub Desktop.
Suspension utility that locks before suspending using slimlock and pm-suspend (from pm-utils). Run with sudo
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
#!/usr/bin/env sh | |
if [ $(id -u) -eq "0" ]; then | |
su $(who -m | awk '{print $1;}') -c slimlock > /dev/null 2>&1 & | |
pm-suspend | |
else | |
echo "Run with sudo instead" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment