#!/bin/sh

# If the clock is hopelessly unset, prompt the user to set the time
if [ `date "+%Y"` = "1970" ]; then
  gpe-conf time &
  time_set_already=yes
else
  time_set_already=no
fi

# No action if .mbdock exists
if [ ! -f $HOME/.matchbox/mbdock.session ]; then
  mkdir -p $HOME/.matchbox
  cp /etc/gpe/gpe.mbdock $HOME/.matchbox/mbdock.session

  if [ "$time_set_already" = "no" ]; then
    gpe-conf time user_only &
  fi
fi

