Add "afk" function to lock screen.

This commit is contained in:
David Tomaschik
2015-09-24 07:51:20 -07:00
parent d4ad0603e3
commit 2af2fe3e71

11
dotfiles/zshrc.d/afk.zsh Normal file
View File

@@ -0,0 +1,11 @@
function afk {
# Note, may fail if multiple users are logged in with different desktop
# environments.
if pidof cinnamon-screensaver >/dev/null ; then
cinnamon-screensaver-command -l
elif pidof gnome-screensaver >/dev/null ; then
gnome-screensaver-command -l
else
echo 'No screensaver found...' >&2
fi
}