Ok, I made a script that does the job wiht lircrc :
one has to update the .lircrc with
commands inc or play
Code:
#!/bin/bash
if [ ! -f ~/.festivalrc ] ; then
cat <<\! >~/.festivalrc
(Parameter.set 'Audio_Command "aplay -q -c 1 -t raw -f s16 -r $SR $FILE")
(Parameter.set 'Audio_Method 'Audio_Command)
!
fi
if [ "$1" == "--help" ] ; then
echo " play, inc, dec, reset, --help are the possible commands"
exit 0
fi
if [ "$1" == "reset" ] ; then
rm ~/.noxstreamtuner
exit 0
fi
if [ ! -f ~/.noxstreamtuner ] ; then
echo "val= 1" > ~/.noxstreamtuner
echo "max= 5" >> ~/.noxstreamtuner
fi
valuepl="$(cat ~/.noxstreamtuner | grep val | awk '{ print $2 }' )"
maxvaluepl="$(cat ~/.noxstreamtuner | grep max | awk '{ print $2 }' )"
if [ "$1" == "inc" ] ; then
valuepl="$[$valuepl+1]"
fi
if [ "$1" == "dec" ] ; then
valuepl="$[$valuepl-1]"
fi
echo "Checker : $[-$valuepl+$maxvaluepl]"
if [ "$[$valuepl-$maxvaluepl]" -gt 0 ] ; then
valuepl="1"
fi
echo "val= $valuepl" > ~/.noxstreamtuner
echo "max= $maxvaluepl" >> ~/.noxstreamtuner
echo "$(cat ~/.noxstreamtuner | grep val | awk '{ print $2 }' ) out of $(cat ~/.noxstreamtuner | grep max | awk '{ print $2 }' ) " | festival --tts
if [ "$valuepl" == "1" ] ; then
echo "bbc" | festival --tts
fi
if [ "$valuepl" == "2" ] ; then
echo "Linux podcasts" | festival --tts
fi
if [ "$valuepl" == "3" ] ; then
echo "Studio brussels" | festival --tts
fi
if [ "$valuepl" == "4" ] ; then
echo "France info" | festival --tts
fi
if [ "$valuepl" == "5" ] ; then
echo "Audacious" | festival --tts
fi
if [ "play" == "$1" ] ; then
killall -e mplayer totem amule vlc amarok audacious
if [ "$valuepl" == "1" ] ; then
mplayer -fs http://a352.l2168662744.c21686.n.lm.akamaistream.net/D/352/21686/v0001/reflector:50431 &
fi
if [ "$valuepl" == "2" ] ; then
elinks http://feeds.feedburner.com/linuxquestions/LQRadioALL > /tmp/es
grephttp /tmp/es | grep mp3 | xargs totem &
fi
if [ "$valuepl" == "3" ] ; then
mplayer http://mp3.streampower.be/stubru-mid.mp3 &
fi
if [ "$valuepl" == "4" ] ; then
mplayer -af volume=-20 "http://players.creacast.com/creacast/france_info/playlist.m3u" &
fi
if [ "$valuepl" == "5" ] ; then
audacious &
fi
fi
cat ~/.noxstreamtuner