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

set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
menuentry 'Install' {
    set background_color=black
    linux    /debian-installer/riscv64/linux --- quiet
    initrd   /debian-installer/riscv64/initrd.gz
}
submenu --hotkey=a 'Advanced options ...' {
    set menu_color_normal=cyan/blue
    set menu_color_highlight=white/blue
    set gfxpayload=keep
    menuentry '... Expert install' {
        set background_color=black
        linux    /debian-installer/riscv64/linux priority=low ---
        initrd   /debian-installer/riscv64/initrd.gz
    }
    menuentry '... Rescue mode' {
        set background_color=black
        linux    /debian-installer/riscv64/linux rescue/enable=true --- quiet
        initrd   /debian-installer/riscv64/initrd.gz
    }
    menuentry '... Automated install' {
        set background_color=black
        linux    /debian-installer/riscv64/linux auto=true priority=critical --- quiet
        initrd   /debian-installer/riscv64/initrd.gz
    }
    menuentry --hotkey=x '... Expert install with speech synthesis' {
        set background_color=black
        linux    /debian-installer/riscv64/linux priority=low speakup.synth=soft ---
        initrd   /debian-installer/riscv64/initrd.gz
    }
    menuentry --hotkey=r '... Rescue mode with speech synthesis' {
        set background_color=black
        linux    /debian-installer/riscv64/linux rescue/enable=true speakup.synth=soft --- quiet
        initrd   /debian-installer/riscv64/initrd.gz
    }
    menuentry --hotkey=a '... Automated install with speech synthesis' {
        set background_color=black
        linux    /debian-installer/riscv64/linux auto=true priority=critical speakup.synth=soft --- quiet
        initrd   /debian-installer/riscv64/initrd.gz
    }
    submenu '... Desktop environment menu ...' {
        set menu_color_normal=cyan/blue
        set menu_color_highlight=white/blue
        set gfxpayload=keep
        submenu '... GNOME desktop boot menu ...' {
            set menu_color_normal=cyan/blue
            set menu_color_highlight=white/blue
            set gfxpayload=keep
            menuentry '... Install' {
                set background_color=black
                linux    /debian-installer/riscv64/linux desktop=gnome --- quiet
                initrd   /debian-installer/riscv64/initrd.gz
            }
            submenu '... GNOME advanced options ...' {
                set menu_color_normal=cyan/blue
                set menu_color_highlight=white/blue
                set gfxpayload=keep
                menuentry '... Expert install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=gnome priority=low ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry '... Automated install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=gnome auto=true priority=critical --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=x '... Expert install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=gnome priority=low speakup.synth=soft ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=a '... Automated install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=gnome auto=true priority=critical speakup.synth=soft --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
            }
        }
        submenu '... KDE Plasma desktop boot menu ...' {
            set menu_color_normal=cyan/blue
            set menu_color_highlight=white/blue
            set gfxpayload=keep
            menuentry '... Install' {
                set background_color=black
                linux    /debian-installer/riscv64/linux desktop=kde --- quiet
                initrd   /debian-installer/riscv64/initrd.gz
            }
            submenu '... KDE Plasma advanced options ...' {
                set menu_color_normal=cyan/blue
                set menu_color_highlight=white/blue
                set gfxpayload=keep
                menuentry '... Expert install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=kde priority=low ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry '... Automated install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=kde auto=true priority=critical --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=x '... Expert install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=kde priority=low speakup.synth=soft ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=a '... Automated install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=kde auto=true priority=critical speakup.synth=soft --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
            }
        }
        submenu '... LXDE desktop boot menu ...' {
            set menu_color_normal=cyan/blue
            set menu_color_highlight=white/blue
            set gfxpayload=keep
            menuentry '... Install' {
                set background_color=black
                linux    /debian-installer/riscv64/linux desktop=lxde --- quiet
                initrd   /debian-installer/riscv64/initrd.gz
            }
            submenu '... LXDE advanced options ...' {
                set menu_color_normal=cyan/blue
                set menu_color_highlight=white/blue
                set gfxpayload=keep
                menuentry '... Expert install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=lxde priority=low ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry '... Automated install' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=lxde auto=true priority=critical --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=x '... Expert install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=lxde priority=low speakup.synth=soft ---
                    initrd   /debian-installer/riscv64/initrd.gz
                }
                menuentry --hotkey=a '... Automated install with speech synthesis' {
                    set background_color=black
                    linux    /debian-installer/riscv64/linux desktop=lxde auto=true priority=critical speakup.synth=soft --- quiet
                    initrd   /debian-installer/riscv64/initrd.gz
                }
            }
        }
    }
}
submenu --hotkey=d 'Accessible dark contrast installer menu ...' {
    set menu_color_normal=white/black
    set menu_color_highlight=yellow/black
    set color_normal=white/black
    set color_highlight=yellow/black
    background_image
    set gfxpayload=keep
    menuentry '... Install' {
        set background_color=black
        linux    /debian-installer/riscv64/linux theme=dark --- quiet
        initrd   /debian-installer/riscv64/initrd.gz
    }
    submenu --hotkey=a '... Advanced options ...' {
        set menu_color_normal=white/black
        set menu_color_highlight=yellow/black
        set color_normal=white/black
        set color_highlight=yellow/black
        background_image
        set gfxpayload=keep
        menuentry '... Expert install' {
            set background_color=black
            linux    /debian-installer/riscv64/linux priority=low theme=dark ---
            initrd   /debian-installer/riscv64/initrd.gz
        }
        menuentry '... Rescue mode' {
            set background_color=black
            linux    /debian-installer/riscv64/linux rescue/enable=true theme=dark --- quiet
            initrd   /debian-installer/riscv64/initrd.gz
        }
        menuentry '... Automated install' {
            set background_color=black
            linux    /debian-installer/riscv64/linux auto=true priority=critical theme=dark --- quiet
            initrd   /debian-installer/riscv64/initrd.gz
        }
    }
}
