#!/bin/bash

App="cmmusic"

if [ -z $1 ]; then
if [ -f /usr/bin/gnome-terminal ]; then
	/usr/bin/gnome-terminal -t $App -e $App 
elif [ -f /usr/bin/konsole ]; then
	/usr/bin/konsole -T $App -e $App
elif [ -f /usr/bin/urxvt ]; then
	/usr/bin/urxvt -T $App -n $App -e $App
elif [ -f /usr/bin/xterm ]; then
	/usr/bin/xterm -T $App -n $App -e $App
fi
	exit
fi

if [ $1 = "-k" ]; then
	if [ -f /usr/bin/konsole ]; then
		/usr/bin/konsole -T $App -e $App
	fi
	exit
fi

if [ $1 = "-g" ]; then
	if [ -f /usr/bin/gnome-terminal ]; then
		/usr/bin/gnome-terminal -t $App -e $App
	fi
	exit
fi

if [ $1 = "-x" ]; then
	if [ -f /usr/bin/xterm ]; then
		/usr/bin/xterm -T $App -n $App -e $App
	fi
	exit
fi

if [ $1 = "-u" ]; then
	if [ -f /usr/bin/urxvt ]; then
		/usr/bin/urxvt -T $App -n $App -e $App
	fi
	exit
fi

