For those of you struggiling without an easy way to mute your audio,
here's a mute script that I wrote a while back. Wagley said I oughta
post it. It remembers the levels for both right and left channels and
relies on aumix for functionality. It can be called from the command
line or by some other program (i.e., xbindkeys).
---<start script>---
#!/bin/bash
# mute - a simple mute/unmute script
# by Brent Thomson
volume_file="$HOME/.mute-volume"
default_vol=35
mute_vol=0 # "low" level (0-100)
aumix_query="aumix -vq"
lvol=`$aumix_query | awk '{ sub(/,/,"",$2); print $2 }'`
rvol=`$aumix_query | awk '{ print $3 }'`
echo "current volume $lvol:$rvol"
# If $volume_file exists, we assume the audio is muted, we unmute it,
# and we delete $volume_file. Otherwise, we assume the audio is not
# muted, we mute it, and we create $volume_file.
if [ -f "$volume_file" ]; then
aumix -Lf $volume_file
rm $volume_file
else
aumix -v$mute_vol
echo "vol:$lvol:$rvol" > $volume_file
fi
---<end script>---
I put it in /usr/bin so that I can just call mute without using the
entire path. Also, I've mapped my keyboard's mute key to the mute
command. Enjoy!
-Brent
____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list