This commit is contained in:
HADEON 2026-04-19 13:19:13 +02:00 committed by GitHub
parent 27e8b23637
commit ca52b7e172
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -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')
raise ValueError('Unhandled return type')

View File

@ -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