#!/bin/sh
pfad="/home/`whoami`/.afterstep/desktop/desklets/"
self=desklet.display
found=0

if [ -n "$1" ]
then
    for i in `ls $pfad |grep -v $self`
    do
    echo "$pfad - > $i -> $1"
	if [ $1 == $i ]
	then
	    found=1
	    if [ -f $pfad$1/config ]
	    then
		x=`cat $pfad$1/config |grep x= |sed 's/^..//'`
		y=`cat $pfad$1/config |grep y= |sed 's/^..//'`
	    else
		found=0
	    fi
	fi
    done
    if [ $found == 1 ]
    then
	"$pfad$1/$1" | ascompose -T ASdesklet.$1 --override -f - -q -g $x$y -I
    else
	echo "$1 not found - plz enter the correct name of ASdesklet"
    fi
fi
# ./sysinfo | ascompose --override -f - -q -g $x$y --timeout 5000 -I
