set hotkey="_"

source ${menudir}/Main.cfg;
### Start InstallWinISO
GetHotkey
menuentry "${installwiniso}" --hotkey=${hotkey} {
	#unset ignore_fs_args
	#unset ignore_dir_args
	#export ignore_fs_args="fat procfs pyfs"
	#export ignore_dir_args="procfs pyfs"
	unset pim
	unset fs_args
	unset file_ext_args
	unset file_in_loop_args
	export fs_args="fat ntfs exfat"
	export file_ext_args="iso"
	export file_in_loop_args="/sources/install.wim /x64/sources/install.esd /x86/sources/install.esd /sources/install.esd"
	if [ -n "$pc" ]; then
		export file_in_loop_args="${file_in_loop_args} /I386/TXTSETUP.SIF /AMD64/TXTSETUP.SIF"
	fi
	configfile ${prefix}/FileManager.cfg
}
### End InstallWinISO
### Start ISO & IMG Mapper
if [ "$scheme" == "msdos" ]; then
GetHotkey
menuentry "ISO & IMG Mapper" --hotkey=${hotkey} {
	insmod acpi
	hexdump -q -s 9 -n 6 (proc)/acpi_rsdp _oemid
	if [ "x${_oemid}" == "xVMWARE" ] -o [ "x${_oemid}" == "xVBOX  " ] -o [ "x${_oemid}" == "xBOCHS " ]; then
		esc 1 "${vmmsg}"
	else
		configfile ${prefix}/ISOIMGMapper.cfg
	fi
}
fi
### End ISO & IMG Mapper
### Start BootFrom
GetHotkey
menuentry "${bootfrom}" --hotkey=${hotkey} {
	#unset fs_args
	#unset ignore_fs_args
	#unset ignore_dir_args
	#export fs_args="fat ntfs exfat"
	#export ignore_fs_args="fat procfs pyfs"
	#export ignore_dir_args="procfs pyfs"
	unset pim
	unset fs_args
	unset file_ext_args
	unset file_in_loop_args
	export file_ext_args="iso wim vhd vhdx img"
	configfile ${prefix}/FileManager.cfg
}
### End BootFrom
### Start File Manager
GetHotkey
menuentry "${fm}" --hotkey=${hotkey} {
	if [ -n "$pc" ] -a [ -e /AIO/grubfm/loadfm ] -a [ -e /AIO/grubfm/grubfm.iso ]; then
		linux	/AIO/grubfm/loadfm
		initrd	/AIO/grubfm/grubfm.iso
	elif [ -n "$efi" ] -a [ -e /AIO/grubfm/grubfm${_SPEC_UEFI_ARCH}.efi ]; then
		chainloader /AIO/grubfm/grubfm${_SPEC_UEFI_ARCH}.efi
	else
		unset pim
		unset fs_args
		unset file_ext_args
		unset file_in_loop_args
		configfile ${prefix}/FileManager.cfg
	fi
}
### End File Manager
### Start WinOnHDD
GetHotkey
menuentry "${winhdd}" --hotkey=${hotkey} {
	WindowsDetect
}
### End WinOnHDD
### Start OSHdd
GetHotkey
menuentry "${oshdd}" --hotkey=${hotkey} {
	configfile ${prefix}/OSHDD.cfg
}
### End OSHdd
### Start Custom
if [ -e ${menudir}/Custom.cfg ]; then
	source ${menudir}/Custom.cfg;
fi
### End Custom
### Start Grub4dos
if [ -n "$pc" ]; then
GetHotkey
menuentry "Grub4dos" --hotkey=${hotkey} {
	Grub4dosRoot
	set opt="root ${g4droot};configfile /AIO/Menu/Grub4dos.lst"
	linux ${g4d_path}/grub.exe --config-file=${opt}
}
fi
### End Grub4dos
if [ -n "$efi" -a -z "$cd" ]; then
if [ xx64 = x$_SPEC_UEFI_ARCH ]; then
### Start Clover UEFI
	GetHotkey
	menuentry "Clover Bootloader" --hotkey=${hotkey} {
		search --file --no-floppy --set=root /EFI/BOOT/EFIPART
		chainloader /EFI/CLOVER/CLOVERX64.efi
	}
### End Clover UEFI
fi
### Start refind
	GetHotkey
	menuentry "rEFInd" --hotkey=${hotkey} {
		search --file --no-floppy --set=root /EFI/BOOT/EFIPART
		chainloader /EFI/refind/refind_${_SPEC_UEFI_ARCH}.efi
	}
### End refind
fi
### Start Search Grub2 configfile
GetHotkey
menuentry "${searchcfgmenu}" --hotkey=${hotkey} {
	configfile ${prefix}/SearchGrub2Cfg.cfg
}
### End Search Grub2 configfile
### Start Disable Secure Boot
if [ "x${secureboot}" == "xON" ]; then
GetHotkey
menuentry "${disablesb}" --hotkey=${hotkey} {
	efiload -n /efi/drivers/fucksb_${_SPEC_UEFI_ARCH}.efi
	Refresh
}
fi
### End Disable Secure Boot
### Start Refresh
GetHotkey
menuentry "${f5}" --hotkey=${hotkey} {
	Refresh
}
### End Refresh
### Start halt
GetHotkey
menuentry "${halt}" --hotkey=${hotkey} {
	halt
}
### End halt
### Start reboot
GetHotkey
menuentry "${reboot}" --hotkey=${hotkey} {
	reboot
}
### End reboot
### Start changeroot
GetHotkey
menuentry "${changeroot}" --hotkey=${hotkey} {
	configfile ${prefix}/ChangeRoot.cfg
}
### End changeroot
### Start help
GetHotkey
menuentry "${settings}" --hotkey=${hotkey} {
	configfile ${prefix}/Settings.cfg
}
### End help
export hotkey="_"