Ventoy Menu Class Plugin
- What is menu class
Ventoy use grub2's theme which has a class property in the menu. You can refer https://www.gnu.org/software/grub/manual/grub/grub.html for detail.
To be simply, you can define a class for the ISO files and show an icon in the boot menu.
For example, you define a menu with class 'ubuntu' and put a ubuntu.png
file in
icons
directory under the theme directory. Then the icon can be shown in the menu as bellows:
- Json Configuration
A menu_class
array is defined to describe the configuration in /ventoy/ventoy.json
. Both image file and directory are supported.
Use key
to specify a substring of the image file name and dir
to specify the full path of a directory.
{ "menu_class": [ { "key": "MX-", "class": "mx" }, { "key": "ubuntu", "class": "ubuntu" }, { "key": "CentOS-7-", "class": "centos" }, { "dir": "/ISO/Linux", "class": "linux" } ] }
Key | Type | Description |
---|---|---|
key |
STRING |
The key string. Ventoy will do a substring match (case sensitive) with the ISO name and this key. If this key is a substring of the ISO name, then the ISO menu will use the class. Only name of the ISO file will be used for match (not the full path) |
dir |
STRING |
The full path of a directory. Ventoy will do a full string match (case sensitive) and use the class if matched. |
class |
STRING |
menu class string (max length: 128) |
- The class has higher position with higher priority
- The match for the key is something like
strstr(iso_name, key)
- If you have huge number of ISO files in USB and define a long menu_class array, it will take a little long time to load Ventoy's boot menu.
- You need to set
item_spacing
item_padding
item_icon_space
and other variables in theme.txt for better display (Grub2 theme tutorial)
Built-in Class | Description |
---|---|
vtoyret |
All the return to previous menu will use this class |
vtoydir |
If none of the item in menu_calss match, Ventoy will use it as the default class for directory. |
vtoyiso |
If none of the item in menu_calss match, Ventoy will use it as the default class for ISO file. |
vtoywim |
If none of the item in menu_calss match, Ventoy will use it as the default class for WIM file. |
vtoyimg |
If none of the item in menu_calss match, Ventoy will use it as the default class for IMG file. |
vtoyefi |
If none of the item in menu_calss match, Ventoy will use it as the default class for EFI file. |
vtoyvhd |
If none of the item in menu_calss match, Ventoy will use it as the default class for VHD(x) file. |
vtoyvtoy |
If none of the item in menu_calss match, Ventoy will use it as the default class for vtoy file. |
power_reboot |
F2 Power --- Reboot |
power_halt |
F2 Power --- Halt |
boot_windows |
F4 Localboot --- Search and boot Windows |
boot_g4d |
F4 Localboot --- Search and boot Grub4dos |
boot_disk |
F4 Localboot --- Boot the 1st/2nd/3rd local disk |
boot_uefi |
F4 Localboot --- Search and boot BOOTX64.EFI |
debug_krdlayout |
F5 Tools --- Keyboard Layouts |
debug_kbd |
F5 Tools --- Keyboard Layouts --- QWERTY_USA/AZERTY/CZECH_QWERTY... |
debug_resolution |
F5 Tools --- Resolution Configuration |
debug_videomode |
F5 Tools --- Resolution Item (e.g. 1024x768x32) |
debug_screen_mode |
F5 Tools --- Screen Display Mode |
debug_text_mode |
F5 Tools --- Screen Display Mode --- Force Text Mode |
debug_gui_mode |
F5 Tools --- Screen Display Mode --- Force Graphics Mode |
debug_json |
F5 Tools --- Check plugin json configuration (ventoy.json) |
debug_control |
F5 Tools --- Check global control plugin configuration |
debug_theme |
F5 Tools --- Check theme plugin configuration |
debug_autoinstall |
F5 Tools --- Check auto install plugin configuration |
debug_persistence |
F5 Tools --- Check persistence plugin configuration |
debug_menualias |
F5 Tools --- Check menu alias plugin configuration |
debug_menuclass |
F5 Tools --- Check menu class plugin configuration |
debug_injection |
F5 Tools --- Check injection plugin configuration |
debug_automemdisk |
F5 Tools --- Check auto memdisk plugin configuration |
debug_imagelist |
F5 Tools --- Check image list plugin configuration |
debug_imageblacklist |
F5 Tools --- Check image blacklist plugin configuration |
debug_bootconf_replace |
F5 Tools --- Check boot conf replace plugin configuration |
debug_dud |
F5 Tools --- Check dud plugin configuration |
debug_pwd |
F5 Tools --- Check password plugin configuration |
debug_custom_boot |
F5 Tools --- Check custom boot plugin configuration |
debug_util |
F5 Tools --- Ventoy UEFI Utilities |
- Multi-Mode
Supported. You can set different configurations for different BIOS mode. Please refer Multi-Mode Option for details.
- Directory Level