#!/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 && xscreensaver-command -deactivate # notify-send "Screen on." -i /usr/share/icons/gnome/48x48/devices/display.png else touch $screensvronlock sleep .1 while [ -f $screensvronlock ] do xscreensaver-command -activate sleep 8 done fi