mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
Add "afk" function to lock screen.
This commit is contained in:
11
dotfiles/zshrc.d/afk.zsh
Normal file
11
dotfiles/zshrc.d/afk.zsh
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user