I don't have time for anything too fancy right now, but here's what I've got. This will at least get you started.
Thumbnails aren't working for me. Here's a screenshot.
I use lineakd to capture my hardware buttons (there are several other options for this). My lineakd.conf lists the following:
Mute = "/opt/sound-indicator.sh mute"
Unmute = "/opt/sound-indicator.sh unmute"
VolumeDown = "/opt/sound-indicator.sh 1-"
VolumeUp = "/opt/sound-indicator.sh 1+"
And my sound-indicator.sh is:
amixer set Master $1
vol=`amixer get Master | grep Left: | sed 's/^.*\[\(.*\)%\].*/\1/'`
if [[ "`amixer get Master | grep Left: | sed 's/^.*\[\(.*\)\].*/\1/'`" = "off" ]]; then
if [[ $vol = "0" ]]; then
convert -size 102x5 xc:"#444" /tmp/sndvol.png
convert -size 102x5 xc:"#444" -fill $fill -draw "rectangle 1,1 $vol,3" /tmp/sndvol.png
qiv -p /tmp/sndvol.png &
So there you go. It's quite plain, but it looks nice enough that I may not bother designing anything fancier any time soon. If you do improve upon it though, please post it here.
Also you might also want to mpg321 a short sound effect, as in OSX's signature popping.