#!/bin/sh
xbellparams="`xset q | grep '^ *bell' | sed -e 's/[^0-9][^0-9]*/ /g' -e 's/^ *//'`"
xbellpitch="`echo $xbellparams | cut -d\\   -f 2`"
#echo "$xbellpitch"
xset b 0 $xbellpitch 0
xset b off
xset +dpms
xset dpms 30 30 30
(sleep 4; xset dpms force off)&
if [ "$1x" == "nolockx" ]; then
  xlock -nolock -mode blank
else
  xlock
fi
xset b on
xset b $xbellparams
xset dpms 600 600 600
