#!/bin/sh

#using KDE
[ -n "$KDE_FULL_SESSION" ] && DECORATOR=`which aquamarine 2>/dev/null`
#using Gnome
[ -n "$GNOME_DESKTOP_SESSION_ID" ] && DECORATOR=`which heliodor 2>/dev/null`

[ -z "$DECORATOR" ] && DECORATOR=`which emerald 2>/dev/null`
[ -z "$DECORATOR" ] && DECORATOR=`which heliodor 2>/dev/null`
[ -z "$DECORATOR" ] && DECORATOR=`which aquamarine 2>/dev/null`

if [ -n "$DECORATOR" ]; then 
  exec $DECORATOR "$@"
else
  echo "no beryl window decorator detected"
fi
