#!/bin/sh
goodbye()
{
echo "My work here is done, enjoy a better desktop!"
}
options()
{
echo ""
echo ""
echo ""
echo "Options:"
echo ""
echo "1: Fix double boot, stop loading easymode before full mode"
echo "2: Fix power moniter, show the power icon in the taskbar"
echo "3: Fix network icon, make sure that the network moniter shows in the taskbar"
echo "4: I'm finished thanks (quit)"
echo ""
echo "Plese enter a number:"
read option
case $option in
	"1") 
		#fix double boot
		sed 's/\/opt\/xandros\/bin\/AsusLauncher/#\/opt\/xandros\/bin\/AsusLauncher/g' /usr/bin/startsimple.sh > /usr/bin/startsimple2.sh
		sed 's/abcdefg/abcdefg/g' /usr/bin/startsimple2.sh > /usr/bin/startsimple.sh
		echo ""
		echo "Finished fixing double boot."
		echo ""
		echo "cleaning up..."
		echo ""
		rm /usr/bin/startsimple2.sh
		echo "Done! your eeepc will now boot faster"
		echo "Press enter to go to menu"
		read
		options
	;;
	"2") 
		#fix power icon
		sed 's/icewmtray/#icewmtray/g' /usr/bin/startsimple.sh > /usr/bin/startsimple2.sh
		sed 's/abcdefg/abcdef/g' /usr/bin/startsimple2.sh > /usr/bin/startsimple.sh
		echo ""
		echo "Finished fixing power moniter."
		echo ""
		echo "cleaning up..."
		echo ""
		rm /usr/bin/startsimple2.sh
		echo "Done! your eeepc will now boot faster"
		echo "Press enter to go to menu"
		read
		options
	;;
	"3") 
		#fix network icon
		sed 's/networkmonitor/networkmonitor2/g' /usr/bin/startsimple.sh > /usr/bin/startsimple2.sh
		sed 's/abcdefg/abcdef/g' /usr/bin/startsimple2.sh > /usr/bin/startsimple.sh
		echo ""
		echo "Finished fixing power moniter."
		echo ""
		echo "cleaning up..."
		echo ""
		rm /usr/bin/startsimple2.sh
		echo "Done!"
		echo "Press enter to go to menu"
		read
		options
	;;	
	"4")
	goodbye
	;;
	*)
	options
	;;
	esac
}

echo "This script will optimise the boot time of your EEEPC when loading the full desktop mode. If you do not have full desktop mode enabled then this script may damage your system, please make sure that it is installed first."
echo ""
echo "Please note that super user privileges are needed to run this script."
echo ""
echo "press enter when you are ready (startsimple.sh will be backed up before starting)"
read
sed 's/abcdefg/abcdefg/g' /usr/bin/startsimple.sh > /usr/bin/startsimpleBACKUP.sh
echo "backedup startup script to /usr/bin/startsimpleBACKUP.sh"
options

