#!/bin/bash

PORTABLE="-style windows"

# Some helpful funtions
function get_pid ()
{
	WHOAMI=`whoami`
	if [ "${WHOAMI}" == "lucid" ]; then
		LUCID_PID=`ps -ef | awk '$8 ~ /^\/home\/lucid\/tabor\/lucid_gui.run/ {print $2}'`
	else
		LUCID_PID=`ps -ef | awk '$8 ~ /^\/home\/pi\/tabor\/lucid_gui.run/ {print $2}'`
	fi
}

# Setting up some extra configurations
xmodmap -e "keycode 64 = "
xmodmap -e "keycode 108 = "
xmodmap -e "keycode 133 = "

# Copy the lucid_gui.new into executable file
cp /home/$USER/tabor/lucid_gui.new /home/${USER}/tabor/lucid_gui.run

# Set executable permissions
chmod +x /home/${USER}/tabor/lucid_gui.run

# Start lucid_gui.run
/home/${USER}/tabor/lucid_gui.run ${PORTABLE}
