diff --git a/archinstall/lib/locale/locale_menu.py b/archinstall/lib/locale/locale_menu.py index aaf20089..73cd534a 100644 --- a/archinstall/lib/locale/locale_menu.py +++ b/archinstall/lib/locale/locale_menu.py @@ -148,6 +148,7 @@ async def select_kb_layout(preset: str | None = None) -> str | None: case _: raise ValueError('Unhandled return type') + async def select_console_font(preset: str | None = None) -> str | None: fonts = list_console_fonts() @@ -155,12 +156,12 @@ async def select_console_font(preset: str | None = None) -> str | None: group = MenuItemGroup(items, sort_items=False) group.set_focus_by_value(preset) - result = SelectMenu[str]( + result = await Selecton[str]( group, - alignment=Alignment.CENTER, - frame=FrameProperties.min(tr('Console font')), - allow_skip=True, - ).run() + header=tr('Console font'), + group=group, + enable_filter=True, + ).show() match result.type_: case ResultType.Selection: @@ -168,4 +169,4 @@ async def select_console_font(preset: str | None = None) -> str | None: case ResultType.Skip: return preset case _: - raise ValueError('Unhandled return type') \ No newline at end of file + raise ValueError('Unhandled return type') diff --git a/archinstall/lib/locale/utils.py b/archinstall/lib/locale/utils.py index c86e30b4..27393cef 100644 --- a/archinstall/lib/locale/utils.py +++ b/archinstall/lib/locale/utils.py @@ -2,7 +2,7 @@ from archinstall.lib.command import SysCommand from archinstall.lib.exceptions import ServiceException, SysCallError from archinstall.lib.output import error from archinstall.lib.utils.util import running_from_iso - +from archinstall.linux_path import LPath def list_keyboard_languages() -> list[str]: return ( @@ -112,7 +112,7 @@ def list_timezones() -> list[str]: def list_console_fonts() -> list[str]: fonts: list[str] = [] - font_dir = Path('/usr/share/kbd/consolefonts') + font_dir = LPath('/usr/share/kbd/consolefonts') if font_dir.exists(): for f in font_dir.iterdir(): # do not ask me there are readme files in here