2010-02-24 15:43:59 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# PID of "gnome-screensaver-command -i" (if used)
|
|
|
|
GSC_PID=0
|
|
|
|
|
|
|
|
# if gnome-screensaver is running in the background..
|
|
|
|
if [ $(ps auxww | grep gnome-screensaver | wc -l) -gt 0 ]; then
|
|
|
|
echo "inhibiting gnome screensaver"
|
|
|
|
gnome-screensaver-command -i &
|
|
|
|
# save the PID of the last command
|
|
|
|
GSC_PID=$!
|
|
|
|
fi
|
|
|
|
|
2011-10-04 19:14:11 +00:00
|
|
|
# Stop unclutter
|
|
|
|
if [ $(ps auxww | grep unclutter | wc -l) -gt 0 ]; then
|
|
|
|
echo 'inhibiting unclutter'
|
|
|
|
killall -STOP unclutter
|
|
|
|
fi
|
|
|
|
|
2010-02-24 15:43:59 +00:00
|
|
|
# run quake 2
|
2011-10-04 19:14:11 +00:00
|
|
|
./quake2 $*
|
2010-02-24 15:43:59 +00:00
|
|
|
|
|
|
|
# if gnome-screensaver was running..
|
|
|
|
if [ $GSC_PID -gt 0 ]; then
|
|
|
|
echo "reactivating gnome screensaver"
|
|
|
|
kill $GSC_PID
|
|
|
|
fi
|
2011-10-04 19:14:11 +00:00
|
|
|
|
|
|
|
# Continue unclutter
|
|
|
|
if [ $(ps auxww | grep unclutter | wc -l) -gt 0 ]; then
|
|
|
|
echo 'reactivating unclutter'
|
|
|
|
killall -CONT unclutter
|
|
|
|
fi
|
|
|
|
|