KDE Shellscripting (kdedialog)
choose="$( kdialog --combobox "Select :" "File" "Webcam" "DVD " )" #| Option"
if [ "$choose" = 'File' ]; then
filename="$(kdialog --getopenfilename /home/shorty/Movies/ "*.mkv *.avi *.mpg *.mp4 |Movie Files")"
#:label1
if [[ $? -ne 0 ]]; then
kdialog --caption "Abgebrochen" --sorry "Abgebrochen durch Benutzer"
exit 3
else
options="$(kdialog --title "Input dialog" --inputbox "Any additional options?" " -channels 4 -ao alsa:device=hw=1.0")"
# do whatever you want with filename
mplayer2 $filename $options --fs -loop 0 #af extrastereo=0
fi
#else
#kdialog --caption "Abgebrochen" --sorry "Abgebrochen durch Benutzer"
fi
if [ "$choose" = 'Webcam' ]; then
mplayer tv:// -tv device=/dev/video0
fi
if [ "$choose" = 'DVD' ]; then
mplayer2 dvd://n
fi
if [[ $choose -ne 0 ]]; then
kdialog --caption "Abgebrochen" --sorry "Abgebrochen durch Benutzer"
exit 3
fi;
speichern als shellscript (*.sh) und ausf�hrbar machen
Source