This commit is contained in:
13
setup.py
13
setup.py
@@ -35,6 +35,7 @@ def choices():
|
|||||||
|
|
||||||
def menu():
|
def menu():
|
||||||
global menu2
|
global menu2
|
||||||
|
menu2.clear()
|
||||||
choices_list = choices().splitlines()
|
choices_list = choices().splitlines()
|
||||||
choices_list.append("Exit")
|
choices_list.append("Exit")
|
||||||
menu1 = inquirer.select(
|
menu1 = inquirer.select(
|
||||||
@@ -88,16 +89,16 @@ def menu():
|
|||||||
|
|
||||||
elif menu1 == "Drivers":
|
elif menu1 == "Drivers":
|
||||||
vendors = ["NVIDIA", "AMD", "Intel", "Back to Main Menu"]
|
vendors = ["NVIDIA", "AMD", "Intel", "Back to Main Menu"]
|
||||||
menu2 = inquirer.select(
|
selected_vendor = inquirer.select(
|
||||||
message = "Select your GPU vendor",
|
message = "Select your GPU vendor",
|
||||||
choices = vendors,
|
choices = vendors,
|
||||||
default = None,
|
default = None,
|
||||||
multiselect = False
|
multiselect = False
|
||||||
).execute()
|
).execute()
|
||||||
if menu2 == "Back to Main Menu":
|
if selected_vendor == "Back to Main Menu":
|
||||||
menu()
|
menu()
|
||||||
else:
|
else:
|
||||||
install_drivers(menu2)
|
install_drivers(selected_vendor)
|
||||||
|
|
||||||
elif menu1 == "Enable RPM Fusion":
|
elif menu1 == "Enable RPM Fusion":
|
||||||
enable_rpmfusion()
|
enable_rpmfusion()
|
||||||
@@ -260,7 +261,7 @@ def install_drivers(vendor):
|
|||||||
elif which("dnf") is not None or which("yum") is not None:
|
elif which("dnf") is not None or which("yum") is not None:
|
||||||
os.system("sudo dnf install -y intel-media-driver")
|
os.system("sudo dnf install -y intel-media-driver")
|
||||||
elif which("pacman") is not None:
|
elif which("pacman") is not None:
|
||||||
driver = ["intel-media-driver", "libva-intel-driver"]
|
driver = ["intel-media-driver", "libva-intel-driver", "Back to Main Menu"]
|
||||||
gpu = inquirer.select(
|
gpu = inquirer.select(
|
||||||
message = "Choose driver",
|
message = "Choose driver",
|
||||||
choices = driver,
|
choices = driver,
|
||||||
@@ -271,6 +272,8 @@ def install_drivers(vendor):
|
|||||||
os.system("sudo pacman -S --noconfirm intel-media-driver")
|
os.system("sudo pacman -S --noconfirm intel-media-driver")
|
||||||
elif gpu == "libva-intel-driver":
|
elif gpu == "libva-intel-driver":
|
||||||
os.system("sudo pacman -S --noconfirm libva-intel-driver")
|
os.system("sudo pacman -S --noconfirm libva-intel-driver")
|
||||||
|
elif gpu == "Back to Main Menu":
|
||||||
|
menu()
|
||||||
elif vendor == "NVIDIA":
|
elif vendor == "NVIDIA":
|
||||||
if which("apt") is not None:
|
if which("apt") is not None:
|
||||||
os.system("sudo apt install -y nvidia-driver")
|
os.system("sudo apt install -y nvidia-driver")
|
||||||
@@ -278,7 +281,7 @@ def install_drivers(vendor):
|
|||||||
os.system("sudo dnf install -y akmod-nvidia")
|
os.system("sudo dnf install -y akmod-nvidia")
|
||||||
elif which("pacman") is not None:
|
elif which("pacman") is not None:
|
||||||
os.system("sudo pacman -S --noconfirm nvidia")
|
os.system("sudo pacman -S --noconfirm nvidia")
|
||||||
|
|
||||||
menu()
|
menu()
|
||||||
|
|
||||||
def install_other():
|
def install_other():
|
||||||
|
|||||||
Reference in New Issue
Block a user