I've been playing with the remote control, thought I'd share some
useful stuff I did. Please feel free to point out any improvements you
have!

When I press the power button I want to switch on/off the monitor and
unmute/mute the sound. I wrote a script to do this, which checks the
current monitor status and the current volume. Put a call to this
script in your lircrc for the power button.

11:57:38# cat /etc/lirc/powerbutton.sh 
#!/bin/bash

VOLUME=$(aumix -vq | awk '{ print $3 }' )
MONITOR=$( xset -q | grep Monitor | awk ' { print $3 $4 } ' )

case "$MONITOR" in
    "On")
        xset dpms force standby
        if [ "$VOLUME" != "0" ] ; then
            mute 
        fi
    ;;
    *)
        xset dpms force on
        if [ "$VOLUME" == "0" ] ; then
            mute    # unmute actually, but it is the same script.
        fi
    ;;
esac
_______________________________________________
mythtv-users mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users

Reply via email to