2018-06-21 22:49:50 -05:00

37 lines
663 B
Bash
Executable File

#!/bin/bash
#screensvrlockfile=/tmp/screensvronlock
#
#if [ -f $screensvronlock ];
#then
# rm $screensvronlock
#else
# touch $screensvronlock
# sleep .10
# while [ -f $screensvronlock ]
# do
# xscreensaver-command -activate
# sleep 3
# done
#fi
screensvronlock=/tmp/screensvronlock
if [ -f $screensvronlock ];
then
rm $screensvronlock
# notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png
else
touch $screensvronlock
sleep .5
while [ -f $screensvronlock ]
do
xscreensaver-command -activate
sleep 2
done
xscreensaver-command -deactivate
fi