so I found this little script that opens a file choose window
Code: Select all
#!/bin/sh
FILE=`Xdialog --title "Whats Next!" --fselect / 28 58 2>&1`
case $? in
0)
$1 "$FILE" ;;
1)
echo "Cancel pressed.";;
255)
echo "Box closed.";;
esac
I wanted to use
pick gxine
I would like for it to choose itself what application to use
but the only hint I was able to find was to change it to something like this
Code: Select all
#!/bin/sh
FILE=`Xdialog --title "Whats Next!" --fselect / 28 58 2>&1`
case $? in
0)
if [ "${FILE##*.}" = "mp3" ]
then
xmms "$FILE" ;;
elif [ "${FILE##*.}" = "avi" ]
then
gxine "$FILE"
elif
1)
echo "Cancel pressed.";;
255)
echo "Box closed.";;
esac
only have to define the application once something like this
if [ "${FILE##*.}" = "mp3" or "wav" or "ogg"]
I know this is not a puppy question but help would be greatly apperciated