if loadfont $prefix/font.pf2 ; then
  set gfxmode=800x600
  set gfxpayload=keep
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod gfxterm
  insmod png
  terminal_output gfxterm
fi

if background_image /isolinux/splash.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
elif background_image /splash.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

source /boot/grub/config.cfg

insmod play
play 960 440 1 0 4 440 1
set theme=/boot/grub/live-theme/theme.txt
menuentry --hotkey=g 'Graphical install' {
    set background_color=black
    linux    /install/vmlinuz vga=788 --- quiet 
    initrd   /install/gtk/initrd.gz
}
menuentry --hotkey=i 'Install' {
    set background_color=black
    linux    /install/vmlinuz vga=788 --- quiet 
    initrd   /install/initrd.gz
}
submenu --hotkey=a 'Advanced options ...' {
    set menu_color_normal=cyan/blue
    set menu_color_highlight=white/blue
    set theme=/boot/grub/live-theme/theme.txt
    set gfxpayload=keep
    menuentry '... Graphical expert install' {
        set background_color=black
        linux    /install/vmlinuz priority=low vga=788 --- 
        initrd   /install/gtk/initrd.gz
    }
    menuentry '... Graphical rescue mode' {
        set background_color=black
        linux    /install/vmlinuz vga=788 rescue/enable=true --- quiet  
        initrd   /install/gtk/initrd.gz
    }
    menuentry '... Graphical automated install' {
        set background_color=black
        linux    /install/vmlinuz auto=true priority=critical vga=788 --- quiet 
        initrd   /install/gtk/initrd.gz
    }
    menuentry --hotkey=x '... Expert install' {
        set background_color=black
        linux    /install/vmlinuz priority=low vga=788 --- 
        initrd   /install/initrd.gz
    }
    menuentry --hotkey=r '... Rescue mode' {
        set background_color=black
        linux    /install/vmlinuz vga=788 rescue/enable=true --- quiet 
        initrd   /install/initrd.gz
    }
    menuentry --hotkey=a '... Automated install' {
        set background_color=black
        linux    /install/vmlinuz auto=true priority=critical vga=788 --- quiet 
        initrd   /install/initrd.gz
    }
    submenu --hotkey=s '... Speech-enabled advanced options ...' {
        set menu_color_normal=cyan/blue
        set menu_color_highlight=white/blue
        set theme=/boot/grub/live-theme/theme.txt
        set gfxpayload=keep
        menuentry --hotkey=x '... Expert speech install' {
            set background_color=black
            linux    /install/vmlinuz priority=low vga=788 speakup.synth=soft --- 
            initrd   /install/gtk/initrd.gz
        }
        menuentry --hotkey=r '... Rescue speech mode' {
            set background_color=black
            linux    /install/vmlinuz vga=788 rescue/enable=true speakup.synth=soft --- quiet  
            initrd   /install/gtk/initrd.gz
        }
        menuentry --hotkey=a '... Automated speech install' {
            set background_color=black
            linux    /install/vmlinuz auto=true priority=critical vga=788 speakup.synth=soft --- quiet 
            initrd   /install/gtk/initrd.gz
        }
    }
}

