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:
authorYash Tripathi <tripathiyash97@gmail.com>2021-06-13 18:22:24 +0530
committerGitHub <noreply@github.com>2021-06-13 14:52:24 +0200
commitd30a22cae3e7a37d4141d3a6128e83fc3d47f9be (patch)
tree7ded54b2b2e938cd8e62a4c3b521e2716b7babb7 /archinstall/lib/user_interaction.py
parent4e17355796b257ea6af306f6b3af3e8fb78f94e4 (diff)
Setting proper keys in exported config (#557)
* Set the resolved profile path to the actual desktop environment * split Nvidia driver list into proprietary and open-source * Updated select_driver to use archinstall.arguments for driver selection * Adding default value that works with later .get() * audio will now be prompted irrespective of profile
Diffstat (limited to 'archinstall/lib/user_interaction.py')
-rw-r--r--archinstall/lib/user_interaction.py28
1 files changed, 9 insertions, 19 deletions
diff --git a/archinstall/lib/user_interaction.py b/archinstall/lib/user_interaction.py
index 6ef70aa2..2c5810ae 100644
--- a/archinstall/lib/user_interaction.py
+++ b/archinstall/lib/user_interaction.py
@@ -16,7 +16,7 @@ from .locale_helpers import list_keyboard_languages, verify_keyboard_layout, sea
from .networking import list_interfaces
from .output import log
from .profiles import Profile, list_profiles
-
+from .storage import *
# TODO: Some inconsistencies between the selection processes.
# Some return the keys from the options, some the values?
@@ -700,9 +700,9 @@ def select_driver(options=AVAILABLE_GFX_DRIVERS):
"""
drivers = sorted(list(options))
- default_option = options["All open-source (default)"]
-
+
if drivers:
+ arguments = storage.get('arguments', {})
if has_amd_graphics():
print('For the best compatibility with your AMD hardware, you may want to use either the all open-source or AMD / ATI options.')
if has_intel_graphics():
@@ -710,22 +710,12 @@ def select_driver(options=AVAILABLE_GFX_DRIVERS):
if has_nvidia_graphics():
print('For the best compatibility with your Nvidia hardware, you may want to use the Nvidia proprietary driver.')
- initial_option = generic_select(drivers, input_text="Select your graphics card driver: ")
-
- if not initial_option:
- return default_option
-
- selected_driver = options[initial_option]
-
- if type(selected_driver) == dict:
- driver_options = sorted(list(selected_driver))
-
- driver_package_group = generic_select(driver_options, f'Which driver-type do you want for {initial_option}: ', allow_empty_input=False)
- driver_package_group = selected_driver[driver_package_group]
-
- return driver_package_group
-
- return selected_driver
+ arguments['gfx_driver'] = generic_select(drivers, input_text="Select your graphics card driver: ")
+
+ if arguments.get('gfx_driver', None) is None:
+ arguments['gfx_driver'] = "All open-source (default)"
+
+ return options.get(arguments.get('gfx_driver'))
raise RequirementError("Selecting drivers require a least one profile to be given as an option.")