#! /bin/sh

DISPLAY=:0

if [ -z "$1" ]; then
		cut -d: -f1 < /etc/mplayer/channels.conf | grep -v '\[' | sort
		exit
fi

killall mplayer
sleep 1

(
mplayer -cache 4096 "dvb://$1" &
PID=$!

xset dpms force on
xset -dpms
xset s off

wait $PID

xset s on
xset dpms force off
) &

