Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/profiles/xorg.py
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/xorg.py
parent15d56c2bc7174a80aa23ef8f0896c286b925a382 (diff)
readded some commits that got removed
Diffstat (limited to 'profiles/xorg.py')
-rw-r--r--profiles/xorg.py70
1 files changed, 0 insertions, 70 deletions
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