Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/user_interaction.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-05-19 14:45:13 +0000
committerGitHub <noreply@github.com>2021-05-19 16:45:13 +0200
commit49e6cbdc545402e066bdc2daf6054abf6c1bf977 (patch)
treea1d4afcc6473d93bc958eab8241dbad616033dba /archinstall/lib/user_interaction.py
parent52960bd686c92af4813ce302a21eb63a5aa67343 (diff)
Reworking SysCommand & Moving to localectl for locale related activities
* Moving to `localectl` rather than local file manipulation *(both for listing locales and setting them)*. * Swapped `loadkeys` for localectl. * Renamed `main` to `maim` in awesome profile. * Created `archinstall.Boot(<installation>)` which spawns a `systemd-nspawn` container against the installation target. * Exposing systemd.py's internals to archinstall global scope. * Re-worked `SysCommand` completely, it's now a wrapper for `SysCommandWorker` which supports interacting with the process in a different way. `SysCommand` should behave just like the old one, for backwards compatibility reasons. This fixes #68 and #69. * `SysCommand()` now has a `.decode()` function that defaults to `UTF-8`. * Adding back peak_output=True to pacstrap. Co-authored-by: Anton Hvornum <anton.feeds@gmail.com> Co-authored-by: Dylan Taylor <dylan@dylanmtaylor.com>
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 5f849607..50c62aa9 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -591,7 +591,7 @@ def select_profile(options):
raise RequirementError("Selecting profiles require a least one profile to be given as an option.")
-def select_language(options, show_only_country_codes=True):
+def select_language(options, show_only_country_codes=True, input_text='Select one of the above keyboard languages (by number or full name): '):
"""
Asks the user to select a language from the `options` dictionary parameter.
Usually this is combined with :ref:`archinstall.list_keyboard_languages`.
@@ -613,14 +613,13 @@ def select_language(options, show_only_country_codes=True):
languages = sorted(list(options))
if len(languages) >= 1:
- for index, language in enumerate(languages):
- print(f"{index}: {language}")
+ print_large_list(languages, margin_bottom=4)
print(" -- You can choose a layout that isn't in this list, but whose name you know --")
- print(" -- Also, you can enter '?' or 'help' to search for more languages, or skip to use US layout --")
+ print(f" -- Also, you can enter '?' or 'help' to search for more languages, or skip to use {default_keyboard_language} layout --")
while True:
- selected_language = input('Select one of the above keyboard languages (by name or full name): ')
+ selected_language = input(input_text)
if not selected_language:
return default_keyboard_language
elif selected_language.lower() in ('?', 'help'):
@@ -705,8 +704,7 @@ def select_driver(options=AVAILABLE_GFX_DRIVERS):
default_option = options["All open-source (default)"]
if drivers:
- lspci = SysCommand('/usr/bin/lspci')
- for line in lspci.trace_log.split(b'\r\n'):
+ for line in SysCommand('/usr/bin/lspci'):
if b' vga ' in line.lower():
if b'nvidia' in line.lower():
print(' ** nvidia card detected, suggested driver: nvidia **')