3 # Belongs in "$HOME/.fvwm/fvwm-menu-music"
8 menu="`echo $1|sed -e 's/"/\\\\"/g'`"
10 echo "DestroyMenu recreate \"$menu\""
11 echo "AddToMenu \"$menu\""
12 echo "+ DynamicPopDownAction DestroyMenu \"$menu\""
13 echo "+ MissingSubMenuFunction FuncMenuMusic"
15 icontitle=48x48-gnome/folder-open.xpm
16 [ -f ".icontitle.png" ] && icontitle="$1/.icontitle.png"
17 [ -f "../.`basename $1`.png" ] && icontitle="`dirname $1`/.`basename $1`.png"
18 [ -f "../.`basename $1`.xpm" ] && icontitle="`dirname $1`/.`basename $1`.xpm"
19 [ -f ".title.png" ] && icontitle="$1/.title.png"
20 [ -f ".title.xpm" ] && icontitle="$1/.title.xpm"
21 echo "+ \"*$icontitle*\" FuncMusicPlay \"$menu\""
24 /bin/ls -1|while read fn; do
25 fs="`echo $fn|sed -e 's/"/\\\\"/g'`"
26 #fd="`echo $1/$fn|sed -e 's/"/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"/g'`"
27 fe="`echo $1/$fn|sed -e 's/"/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"/g'`"
29 icontitle=menu/folder.xpm
30 #[ -f "$fn/.icontitle.png" ] && icontitle="$1/$fn/.icontitle.png"
31 [ -f "$fn/.title.png" ] && icontitle="$menu/$fs/.title.png"
32 [ -f "$fn/.title.xpm" ] && icontitle="$menu/$fs/.title.xpm"
33 [ -f "$1/.$fn.png" ] && icontitle="$menu/.$fe.png"
34 [ -f "$1/.$fn.xpm" ] && icontitle="$menu/.$fs.xpm"
35 echo "+ \"%$icontitle%`echo $fs|sed -e 's/_/ /g'`\" Popup \"$menu/$fs\""
38 *.jpg|*.png|*.xpm|*.txt) ;;
40 icontitle=menu/file.xpm
41 [ -f ".$fn.png" ] && icontitle= "$menu/.$fs.png"
42 [ -f ".$fn.xpm" ] && icontitle= "$menu/.$fs.xpm"
43 echo "+ \"%$icontitle%`echo $fs|sed -e 's/_/ /g' -e 's/\....$//'`\" FuncMusicPlay \"$fe\""