#!/bin/sh
# tvout.sh
#
# TV-out script for ATI Radeon cards
# http://wiki.archlinux.de/title/ATI#TV-Out
#
# http://freshmeat.net/projects/xvattr/
#
enableTV () {
xrandr --output S-video --set load_detection 1
xrandr --addmode S-video 800x600
xrandr --output S-video --set tv_standard pal
xrandr --output S-video --mode 800x600
xvattr -a XV_CRTC -v 1 # video output to TV
}
disableTV () {
xvattr -a XV_CRTC -v 0 # video output to PC
xrandr --output S-video --off
}
case "$1" in
'on')
enableTV
;;
'off')
disableTV
;;
esac