Ventoy Forums
[Feature request] Icon for submenu - Printable Version

+- Ventoy Forums (https://forums.ventoy.net)
+-- Forum: Ventoy Plugin —— Ventoy 插件 (https://forums.ventoy.net/forumdisplay.php?fid=3)
+--- Forum: Ventoy Plugin Forum (https://forums.ventoy.net/forumdisplay.php?fid=4)
+--- Thread: [Feature request] Icon for submenu (/showthread.php?tid=336)



[Feature request] Icon for submenu - PieR - 07-03-2020

Good morning all,

I have not found how to add icons to the halt, reboot, search ... return submenu. Maybe this option could be integrated in a future version?

Thanks.


RE: [Feature request] Icon for submenu - longpanda - 07-03-2020

In fact, there is class defined for these sub menu and I just haven't had time to update the document in the website.

For example, see  https://github.com/ventoy/Ventoy/blob/master/INSTALL/grub/power.cfg
Code:
menuentry Reboot --class=power_reboot {
    echo -e '\n\nSystem is rebooting ... \n'
    sleep 1
    reboot
}

menuentry Halt --class=power_halt {
    echo -e '\n\nSystem is halting ... \n'
    sleep 1
    halt
}

menuentry 'Return to menu [Esc]' --class=vtoyret VTOY_RET {
    echo 'Return ...'
}

--class=xxx is the class defination.

power_reboot  power_halt  are the corresponding class and you just need to prepare a power_reboot.png  and power_halt.png


RE: [Feature request] Icon for submenu - PieR - 07-03-2020

great i immediately test that


RE: [Feature request] Icon for submenu - PieR - 07-03-2020

I put icons in my folder :

boot_g4d.png
power_reboot.png
boot_windows.png
power_halt.png
vtoyret.png
debug_autoinstall.png
debug_json.png
debug_menualias.png
debug_menuclass.png
debug_persistence.png
debug_theme.png
boot_disk.png

I am missing an icon for "Check global control plugin configuration", I did not find a corresponding class. In any case it works great. thanks again
https://github.com/ventoy/Ventoy/blob/master/INSTALL/grub/debug.cfg


Code:
submenu 'Check plugin json configuration (ventoy.json)' --class=debug_json {
    menuentry 'Check global control plugin configuration' { <--------------------missing class : --class=debug_global ??
        set pager=1
        vt_check_plugin_json $vt_plugin_path control $iso_path
       
        echo -e "\npress ENTER to exit ..."
        read vtInputKey
        unset pager
    }



RE: [Feature request] Icon for submenu - longpanda - 07-03-2020

Yes, I will add it in the next release.