Googling for 'mplayer alarm clock' actually yields a lot of pages dealing with this problem and solutions that you can actually use right away, but let's give it a try anyway.
#!/bin/bash
{
for ((volume = 0; volume <= 100; volume += 5)); do
/usr/bin/aumix -v${volume} -w100 >/dev/null
sleep 2
done
} &
mplayer http://66.225.205.192:80
echo "good morning! :-)"
You need to install aumix
, which is used here to change the volume (but you could use something else, of course). The block between {
}
gets run in the background. The aumix
command sets the PCM volume to 100% and gradually adjusts the main volume in 5 percent increments every two seconds, once it hits 100% the loop finishes and the background job exits.
I have never used aumix
, and you might want to read its man page in case it does not work as expected (this is untested).
mplayer
runs in the foreground until you quit it, upon which it makes coffee for you greets you with a warm welcome.
Does that get you started?