Label

Label is basically a string of text. It holds the following properties.

ID

Meant to make the text into timeout based string, as in the one that shows:

The highlighted entry will be executed automatically in 3s

Default value is unset. The acceptable value would be:

  • __timeout__

Text

The text to display. It accepts any string.


If ID is set __timeout__, the the text accepts pre-defined statements like:

  • @KEYMAP_SHORT@ - for "enter: boot, `e': options, `c': cmd-line"
  • @KEYMAP_MIDDLE@ - for "Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line."
  • @KEYMAP_LONG@ - for "Press enter to boot the selected OS, `e' to edit the commands before booting or `c' for a command-line. ESC to return previous menu."

You can also use the printf %d to represent the countdown digits.

Font

Configure text font.

Color

Configure text color.

Align

Align the text. It accepts 3 values:

  • left
  • center
  • right

By default, it is unset, which is left.

Visible

Hide/show the label. It accepts:

  • true - show the label
  • false - hide the label

General Properties

You can set:

  • left
  • top
  • width

Height is not used. Width is more for alignment usage like left-aligned, center, right-aligned.

Examples

Display only the timer

+ label {
        left = 50%-350
        top = 50%+260
        height = 30
        width = 30
      
        id = "__timeout__"
      
        color = "white"
}

This shows the following, when the timer is 3 seconds left:

3 


Basic Text

+ label {
        left = 50%-300
        top = 50%+220
        height = 30
        width = 600
      
        color = "white"
        align = "right"
        text = "Some text - %d."
}

This shows the following, when the timer is 3 seconds left:

Some text - 3


Special Tag

+ label {
        left = 50%-300
        top = 50%+220
        height = 30
        width = 600
      
        color = "cyan"
      
        align = "center"
      
        text = "@KEYMAP_SHORT@"
}

This shows the following, when the timer is 3 seconds left:

enter: boot, `e`: options, `c`: cmd-line

That's all about label.