Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authoradvaithm <advaith.madhukar@gmail.com>2021-04-22 17:00:51 +0530
committeradvaithm <advaith.madhukar@gmail.com>2021-04-22 17:00:51 +0530
commiteb1ff72f5ba627e09da820b1ce0970d361653eca (patch)
tree574f979cac0ca183a0836e049219ca39e0c4fae7 /profiles
parent15d56c2bc7174a80aa23ef8f0896c286b925a382 (diff)
readded some commits that got removed
Diffstat (limited to 'profiles')
-rw-r--r--profiles/sway.py6
-rw-r--r--profiles/xorg.py70
2 files changed, 6 insertions, 70 deletions
diff --git a/profiles/sway.py b/profiles/sway.py
index 5633cce2..7fb64fd7 100644
--- a/profiles/sway.py
+++ b/profiles/sway.py
@@ -11,6 +11,12 @@ def _prep_function(*args, **kwargs):
other code in this stage. So it's a safe way to ask the user
for more input before any other installer steps start.
"""
+<<<<<<< HEAD
+=======
+
+ __builtins__['_gfx_driver_packages'] = archinstall.select_driver()
+
+>>>>>>> 1292c07... Fixed PR #273. Moved the graphic drivers into hardware since they are hardware specific, in the long run maybe we move them into 'drivers' or something. And moved the user interaction from gfx_drivers into user_interactions. And removed the import from installer.py to __init__.py since we don't want to import 'global functions' in extension imports.
return True
# Ensures that this code only gets executed if executed
diff --git a/profiles/xorg.py b/profiles/xorg.py
index 8e9779bc..4d54fe79 100644
--- a/profiles/xorg.py
+++ b/profiles/xorg.py
@@ -5,76 +5,6 @@ from archinstall import generic_select, sys_command, RequirementError
is_top_level_profile = True
-AVAILABLE_DRIVERS = {
- # Sub-dicts are layer-2 options to be selected
- # and lists are a list of packages to be installed
- 'AMD / ATI' : {
- 'amd' : ['xf86-video-amdgpu'],
- 'ati' : ['xf86-video-ati']
- },
- 'intel' : ['xf86-video-intel'],
- 'nvidia' : {
- 'open source' : ['xf86-video-nouveau'],
- 'proprietary' : ['nvidia']
- },
- 'mesa' : ['mesa'],
- 'fbdev' : ['xf86-video-fbdev'],
- 'vesa' : ['xf86-video-vesa'],
- 'vmware' : ['xf86-video-vmware']
-}
-
-def select_driver(options):
- """
- Some what convoluted function, which's job is simple.
- Select a graphics driver from a pre-defined set of popular options.
-
- (The template xorg is for beginner users, not advanced, and should
- there for appeal to the general public first and edge cases later)
- """
- drivers = sorted(list(options))
-
- if len(drivers) >= 1:
- for index, driver in enumerate(drivers):
- print(f"{index}: {driver}")
-
- print(' -- The above list are supported graphic card drivers. --')
- print(' -- You need to select (and read about) which one you need. --')
-
- lspci = sys_command(f'/usr/bin/lspci')
- for line in lspci.trace_log.split(b'\r\n'):
- if b' vga ' in line.lower():
- if b'nvidia' in line.lower():
- print(' ** nvidia card detected, suggested driver: nvidia **')
- elif b'amd' in line.lower():
- print(' ** AMD card detected, suggested driver: AMD / ATI **')
-
- selected_driver = generic_select(drivers, 'Select your graphics card driver: ',
- allow_empty_input=False, options_output=False)
- initial_option = selected_driver
-
- # Disabled search for now, only a few profiles exist anyway
- #
- #print(' -- You can enter ? or help to search for more drivers --')
- #if selected_driver.lower() in ('?', 'help'):
- # filter_string = input('Search for layout containing (example: "sv-"): ')
- # new_options = search_keyboard_layout(filter_string)
- # return select_language(new_options)
-
- selected_driver = options[selected_driver]
-
- 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
-
- raise RequirementError("Selecting drivers require a least one profile to be given as an option.")
-
def _prep_function(*args, **kwargs):
"""
Magic function called by the importing installer