#! /bin/sh
# File /bin/pi
# Launch console window running pi
if test "$DISPLAY" = ""; then
 echo "DISPLAY not set for X-windows. Using windows lccpie"
 /c/usr/lccpie/pi.exe -s:c:\usr\lccpie\.pirc
else
 if test "127.0.0.1:0.0" = "$DISPLAY"; then
  /usr/local/bin/pi-cygwin -term:vt100 "$@" 
 else
  s1="$CMDLINE"
  s2="${s1/rxvt/XXXX}"
  if test "$s1" = "$s2"; then
    xterm -fn "-b&h-lucidatypewriter-bold-r-normal-sans-12-120-75-75-m-70-iso8859-2" -fg black -bg yellow -e pi-cygwin -x -term:xterm "$@" &
  else
   /usr/local/bin/pi-cygwin -term:vt100 "$@" 
  # rxvt -fn "-b&h-lucidatypewriter-bold-r-normal-sans-12-120-75-75-m-70-iso8859-2" -fg black -bg yellow -e pi-cygwin -x -term:vt100 "$@" &
  fi
 fi
fi
