mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 20:51:31 +00:00
caedes Startscript für den blöden Bildschirmschoner
This commit is contained in:
parent
ab803809ee
commit
d2970d6d86
1 changed files with 21 additions and 0 deletions
21
tools/quake2-start.sh
Executable file
21
tools/quake2-start.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/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
|
||||
|
||||
# run quake 2
|
||||
# ./quake2 $*
|
||||
|
||||
# if gnome-screensaver was running..
|
||||
if [ $GSC_PID -gt 0 ]; then
|
||||
echo "reactivating gnome screensaver"
|
||||
kill $GSC_PID
|
||||
fi
|
Loading…
Reference in a new issue