#!/bin/bash # $Id: tv,v 1.2 2003/04/30 00:56:05 shamim Exp $ # Use the XVideo extension ... XV=no # ... and not DGA, and don't try software scaling. # DGA=no # SCALE=no # Start in fullscreen mode GEOM="-fullscreen" # Capture DPMS state DPMS=$(xset q|sed -n '/^DPMS/,/^ *Monitor/p' | awk '/^ +DPMS/{print $3}') MONITOR=$(xset q | sed -n '/^DPMS/,/^ *Monitor/p' | awk '/^ +Monitor/{print tolower($3)}') # Turn off screensaver and DPMS while watching TV xset -dpms xset s off xawtv -geo =640x480+0+0 $GEOM -${XV}xv -${DGA}dga -${SCALE}scale vcr # Restore DPMS state if [ "Enabled" = "$DPMS" ]; then xset +dpms xset dpms force $MONITOR fi # Screensaver xset s on s 90