-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGamingSetup.py
executable file
·53 lines (43 loc) · 1.57 KB
/
GamingSetup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env python3
import platform
import distro
from pyfiglet import Figlet
from clint.textui import colored
from src import options as opt
RED = colored.red
GREEN = colored.green
YELLOW = colored.yellow
distros = ["ubuntu", "debian", "linuxmint", "arch", "endeavouros"]
figlet = Figlet(font='speed')
print(YELLOW(figlet.renderText('''GAME SETUP''')))
while True:
try:
if platform.system() != 'Linux':
print("This is for Linux only")
break
print("Detecting your distro...")
# FIXME: Too many if-else..
if distro.id() in distros or distro.like() in distros:
print(GREEN(
f"[{distro.id()}] distro detected... based on {distro.like()}"))
if distro.id() == "ubuntu" or distro.like() == "ubuntu" or distro.id() == "linuxmint": # temporary fix #25
sys_distro = 1
elif distro.id() == "arch" or distro.like() == "arch":
sys_distro = 2
elif distro.id() == "debian" or distro.like() == "debian" and distro.id() != "ubuntu":
sys_distro = 3
else:
sys_distro = 0
print(GREEN(
"[1] Drivers and DXVK installation\n[2] Useful tools and programs\n[3] Exit"))
op = int(input("Select an option -> "))
if op == 1:
opt.dis_elec("drivers", sys_distro)
elif op == 2:
opt.dis_elec("programs", sys_distro)
elif op == 3:
break
else:
print("Wrong option!")
except ValueError:
print(RED("Invalid entered value"))