#!/bin/sh
# Install user settings for Idesk Icon Manager and start it
# Author: Anton V. Denisov <avd@altlinux.ru>

USERDIR=$HOME/.idesktop

if [ ! -f ~/.ideskrc ]; then
cat > $HOME/.ideskrc << 'EOF'
	table Config
	FontName: tahoma
	FontSize: 8
	FontColor: #ffffff
	PaddingX: 35
	PaddingY: 25
	Locked: false
	HighContrast: false
	Transparency: 150
	Shadow: true
	ShadowColor: #000000
	ShadowX: 1
	ShadowY: 2
	Bold: false
	ClickInterval: 400
	UseDoubleClick: true
	end
EOF

fi

if [ ! -d $USERDIR ]; then
	mkdir -p $USERDIR
	cat > $USERDIR/default.link << 'EOF2'
	table Icon
	Caption: Xterm
	Command: xterm
	Icon: /usr/share/icons/large/terminals_section.png
	end
EOF2

fi


ExecIfExecutable()
{ 
  local f="$1"
  shift
  [ -x "$f" ] && exec "$f" "$@"
}
			
ExecIfExecutable /usr/X11R6/bin/idesk "$@"

