看这个链接更适合些。
主要是存个电台名与地址和格式,中间留空。
然后写了个脚本用于生成网络电视地址的 Fluxbox 自定义菜单,脚本备份如下:
#!/bin/bash
line=`more $HOME/.mmsplaylist | wc -l`
fromfile="$HOME/.mmsplaylist"
tofile="$HOME/.fluxbox/customMenus/mms"
icon="~/picture/icon/music.png"
geom="600x450"
[ ! -f $fromfile ] && echo "Playlist not found!" && exit
if [ ! -d ~/.fluxbox/customMenus ]
then
mkdir -p ~/.fluxbox/customMenus
[ ! -f $tofile ] && touch $tofile
fi
# begin item
echo "[begin] (MMS)" > $tofile
for lc in `seq $line`
do
array=(`sed -n "$lc p" $fromfile`)
field=${#array[@]}
if [ $field -gt 2 ]
then
echo -e "\t[submenu] (${array[0]}) <$icon>" >> $tofile
for url in `seq $((field-1))`
do
echo -e "\t\t[exec] (URL$url) {mplayer -geometry $geom ${array[$url]}} <$icon>" >> $tofile
done
echo -e "\t[end]" >> $tofile
elif [ $field -eq 2 ]
then
echo -e "\t[exec] (${array[0]}) {mplayer -geometry $geom ${array[1]}} <$icon>" >> $tofile
else
echo "NULL!"
fi
done
# MPlayer Control
echo -e "\t[exec] (Stop) {pkill mplayer} <$icon>" >> $tofile
# end item
echo "[end]" >> $tofile
Posted on 03月 19th, 2008 作者: aBiNg
Filed under: Fluxbox, Menu, Script
- gnuplot Tips - 2009-11-16
- CVF 自定义 console 模块 - 2009-10-26
- vim 中隐藏多行注释 - 2009-10-26
Leave a Reply
You must be logged in to post a comment.