#!/bin/sh
# it is not wise to run non-configured xxkb, so we look 
# whether it is configured.
# if [ -e ~/.xxkbrc ] then user has configured xxkb properly
# if [ -e /etc/X11/app-defaults/XXkb ]
# then sysadmin has configured xxkb properly.

# this loop is recommended by mike@
# it works...

#i=0
#MAXI=5

#until [ "$i" = "$MAXI" ]; do
#	sleep 1
#	i="$(($i+1))"
#	pidof icewmtray | grep [0-9] > /dev/null && break
#done

sleep 1

if [ -e ~/.xxkbrc ] || [ -e /etc/X11/app-defaults/XXkb ]; then
  xxkb &
fi

