« Flakey Fedora Installer Issues | Main | Stylin' in Cali »

gxine xscreensaver wrapper

I've got a growing list of tips I ought to blog about, but just haven't gotten around to it. However, Hans' post has inspired me to at least mention a gxine wrapper script I use to avoid the screensaver launching while I'm watching a movie.


#!/bin/bash
gxine -S "$@" &
while pgrep gxine &>/dev/null ; do
  xscreensaver-command -deactivate &>/dev/null
  sleep 60
done

If anybody took up Hans' challenge to write a generic wrapper script, you know that the trickiest part is being able to pass an arbitrary number of arguments to the wrapped program. That's where the magical little "$@" comes in. Making this script even more generic is left as an exercise for the reader.

Update: 26 Aug 2006 I've just posted a much improved, generic version I call noblank.