Progress Bar
Progress bar is the commonly seen bar that displays the message for booting within N seconds. It holds multiple properties to illustrate its progress.
ID
With the value
-
__timeout__
- unset
This is for turning the progress bar to display remaining time or otherwise. Default is unset.
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 "Ns"@KEYMAP_MIDDLE@
- for "Ns remaining."@KEYMAP_LONG@
- for "The highlighted entry will be executed automatically in Ns."
You can also use the printf %d
to represent the countdown digits in your custom script. Example:
You have %ds left
- for "You have Ns left"
text-color
Configure text color
text-font
Configure text font
bg_color, fg_color, border_color
These properties are for mono-color mode display. The idea is that the entire progress bar progress under 2 colors (foreground over background). The border color is meant for border decoration.
bar_style, highlight_style
These properties are for graphical display mode. The idea is to use 2 images to overlap one another to display progress. It is advisable to use central slice graphic for the highlight_style
.
The acceptable values are:
"<name>_*.png"
- all image files specific to style boxes' direction.*
- to indicate no file is needed
If you want a blank and no graphic style, set both to asterisk (*
). This will create a translucent progress bar with only text available. The idea is that, if bar_style
is the same as highlight_style
, then no image will appear.
Common Properties
You should always configure:
left
top
Optionally:
width
height
If width and height is less accommodating than the display text, it will be adjusted automatically.
Examples
To produce the graphics above, we have:
Mono Color Mode
+ progress_bar {
left = 50%-300
top = 50%+200
width = 600
height = 50
id = "__timeout__"
text = "@TIMEOUT_NOTIFICATION_LONG@"
border_color = "white"
bg_color = "128, 128, 128"
fg_color = "200, 200, 200"
}
Styled Mode
+ progress_bar {
left = 50%-300
top = 50%+200
width = 600
height = 50
id = "__timeout__"
text = "@TIMEOUT_NOTIFICATION_LONG@"
bar_style = "inbox_*.png"
highlight_style = "progress_*.png"
}
Blank Mode
+ progress_bar {
left = 50%-300
top = 50%+200
width = 600
height = 50
id = "__timeout__"
text = "@TIMEOUT_NOTIFICATION_LONG@"
text_color = "white"
bar_style = "*"
highlight_style = "*"
}
That's all about progress bar in GRUB themes.