a1ive / grub

Fork of GRUB 2 to add various features.
GNU General Public License v3.0
138 stars 38 forks source link

Query: Are variables in a theme .txt file supported? #90

Closed steve6375 closed 3 years ago

steve6375 commented 3 years ago

In Ventoy, themes seem to be able to use variables in their .txt files, e.g.

+ hbox{ 
    left = 30%
    top = 95%
    width = 10%
    height = 25
    + label {text = "@HOTKEY_TIP@" color = "blue" align = "left"} 
}

This does not seem to work in a1ive grub2. Is there some trick?

a1ive commented 3 years ago

https://github.com/ventoy/Ventoy/blob/784e3ae8794b51cc9924b0bbb65ba41beb6e6bd4/GRUB2/MOD_SRC/grub-2.04/grub-core/gfxmenu/gui_label.c#L211

You can use @@VAR in my grub2. https://github.com/a1ive/grub2-filemanager/blob/fb85b3a8a76137ceaa230cc2a9dc7cbf37032d09/boot/grubfm/themes/slack/help.txt#L21 Note, however, that the displayed strings are static, and once the theme is loaded, the screen display will not change even if you change the values of the variables.

a1ive commented 3 years ago

It is now possible to use the experimental new github feature "discussion" to ask questions, if not bugs or feature requests. https://github.com/a1ive/grub/discussions