Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ventoy boot menu
#1
Hello Master Longpanda; How to write theme.txt in order for some information about computer hardware to appear in the main menu. is it possible?

e.g.

theme.txt

+ vbox {
  left = 1%
  top = 1%
  + hbox {
  + label {text = "SecureBoot" color = "#ffff00"}
  + label {text = "@$grub_uefi_version@" color = "#ffff00"}
  }
  + hbox {
  + label {text = "Platform" color = "#ffff00"}
  + label {text = "@$grub_cpu-$grub_platform@" color = "#ffff00"}
  }
  + hbox {
  + label {text = "RAM" color = "#ffff00"}
  + label {text = "@$grub_total_ram MB@" color = "#ffff00"}
  }
  + hbox {
  + label {text = "Resolution" color = "#ffffff"}
  + label {text = "......." color = "#ffff00"}
  }
}
Reply
#2
doesn't work
Reply
#3
There are not many variables registered by ventoy for theme.txt, there are a few variables available: VTOY_HOTKEY_TIP, VTOY_MEM_DISK, VTOY_ISO_RAW, VTOY_GRUB2_MODE, VTOY_WIMBOOT_MODE, VTOY_ISO_UEFI_DRV, TIMEOUT_SHORTIFICATION
Reply
#4
I add @@XXXX for variable expansion in label component.

Try this CI release:
https://github.com/ventoy/Ventoy/actions...3732973042
https://www.ventoy.net/en/doc_github_ci.html


Code:
+ vbox {
  left = 80%
  top = 1%
  width = 10% 
  + hbox {
  + label {text = "Platform" color = "#ff0000"}
  }
  + hbox {
  + label {text = "RAM" color = "#ff0000"}
  }
  + hbox {
  + label {text = "Resolution" color = "#ff0000"}
  }
}

+ vbox {
  left = 90%
  top = 1%
  width = 10% 
  + hbox {
  + label {text = "@@grub_cpu_platform" color = "#0000ff"}
  }
  + hbox {
  + label {text = "@@grub_total_ram" color = "#0000ff"}
  + label {text = " MB" color = "#0000ff"}
  }
  + hbox {
  + label {text = "@@gfxmode" color = "#0000ff"}
  }
}


Attached Files Thumbnail(s)
   
Reply
#5
(12-19-2022, 04:19 PM)longpanda Wrote: I add @@XXXX for variable expansion in label component.

Try this CI release:
https://github.com/ventoy/Ventoy/actions...3732973042
https://www.ventoy.net/en/doc_github_ci.html


Code:
+ vbox {
  left = 80%
  top = 1%
  width = 10% 
  + hbox {
  + label {text = "Platform" color = "#ff0000"}
  }
  + hbox {
  + label {text = "RAM" color = "#ff0000"}
  }
  + hbox {
  + label {text = "Resolution" color = "#ff0000"}
  }
}

+ vbox {
  left = 90%
  top = 1%
  width = 10% 
  + hbox {
  + label {text = "@@grub_cpu_platform" color = "#0000ff"}
  }
  + hbox {
  + label {text = "@@grub_total_ram" color = "#0000ff"}
  + label {text = " MB" color = "#0000ff"}
  }
  + hbox {
  + label {text = "@@gfxmode" color = "#0000ff"}
  }
}
excellent...thank you so much master @longpanda.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)