File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,24 +148,25 @@ async def select_kb_layout(preset: str | None = None) -> str | None:
148148 case _:
149149 raise ValueError ('Unhandled return type' )
150150
151+
151152async def select_console_font (preset : str | None = None ) -> str | None :
152153 fonts = list_console_fonts ()
153154
154155 items = [MenuItem (f , value = f ) for f in fonts ]
155156 group = MenuItemGroup (items , sort_items = False )
156157 group .set_focus_by_value (preset )
157158
158- result = SelectMenu [str ](
159+ result = await Selecton [str ](
159160 group ,
160- alignment = Alignment . CENTER ,
161- frame = FrameProperties . min ( tr ( 'Console font' )) ,
162- allow_skip = True ,
163- ).run ()
161+ header = tr ( 'Console font' ) ,
162+ group = group ,
163+ enable_filter = True ,
164+ ).show ()
164165
165166 match result .type_ :
166167 case ResultType .Selection :
167168 return result .get_value ()
168169 case ResultType .Skip :
169170 return preset
170171 case _:
171- raise ValueError ('Unhandled return type' )
172+ raise ValueError ('Unhandled return type' )
Original file line number Diff line number Diff line change 22from archinstall .lib .exceptions import ServiceException , SysCallError
33from archinstall .lib .output import error
44from archinstall .lib .utils .util import running_from_iso
5-
5+ from archinstall . linux_path import LPath
66
77def list_keyboard_languages () -> list [str ]:
88 return (
@@ -112,7 +112,7 @@ def list_timezones() -> list[str]:
112112
113113def list_console_fonts () -> list [str ]:
114114 fonts : list [str ] = []
115- font_dir = Path ('/usr/share/kbd/consolefonts' )
115+ font_dir = LPath ('/usr/share/kbd/consolefonts' )
116116 if font_dir .exists ():
117117 for f in font_dir .iterdir ():
118118 # do not ask me there are readme files in here
You can’t perform that action at this time.
0 commit comments