#!/bin/sh
# Change IceWM Icon
# Set user's icon dir
#
# License : GNU GPL
# (c) Eko M. Budi, 2004
# (c) Vector Linux, 2004


if [ "$1" = "" ]; then
echo "Usage: $0 <icon_theme>"
echo "Use icon_theme as the default IceWM icon"
echo "This small script does not check anything, so be carefull :)"
fi

ICON_DIR=$1
ICON_HOME="$HOME/.icewm/icons"

if [ ! -d $ICON_DIR ]; then
   $ICON_DIR=/usr/share/icons/$1
fi

if [ -d $ICON_DIR ]; then
   rm -rf $ICON_HOME
   ln -sf $ICON_DIR $ICON_HOME
   skill -HUP icewm 2>&1 /dev/null
fi
