Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/menu/menu.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/menu/menu.py')
-rw-r--r--archinstall/lib/menu/menu.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/archinstall/lib/menu/menu.py b/archinstall/lib/menu/menu.py
index c52ed8f3..d254e0f9 100644
--- a/archinstall/lib/menu/menu.py
+++ b/archinstall/lib/menu/menu.py
@@ -26,6 +26,7 @@ class Menu(TerminalMenu):
preview_command=None,
preview_size=0.75,
preview_title='Info',
+ header :Union[List[str],str] = None,
**kwargs
):
"""
@@ -65,6 +66,9 @@ class Menu(TerminalMenu):
:param preview_title: Title of the preview window
:type preview_title: str
+ param: header one or more header lines for the menu
+ type param: string or list
+
:param kwargs : any SimpleTerminal parameter
"""
# we guarantee the inmutability of the options outside the class.
@@ -104,10 +108,15 @@ class Menu(TerminalMenu):
self.default_option = default_option
self.multi = multi
menu_title = f'\n{title}\n\n'
-
- if skip:
+ if header:
+ separator = '\n '
+ if not isinstance(header,(list,tuple)):
+ header = [header,]
+ if skip:
+ menu_title += str(_("Use ESC to skip\n"))
+ menu_title += separator + separator.join(header)
+ elif skip:
menu_title += str(_("Use ESC to skip\n\n"))
-
if default_option:
# if a default value was specified we move that one
# to the top of the list and mark it as default as well