mirror of
https://github.com/lubuntu-team/lubuntu-about.git
synced 2025-06-06 13:31:31 +00:00
Replace one bit of horrible spaghetti code with some spaghetti code that's less horrible but still horrible.
This commit is contained in:
parent
93c494e058
commit
ab293880a2
1
debian/control
vendored
1
debian/control
vendored
@ -20,6 +20,7 @@ Vcs-Browser: https://github.com/lubuntu-team/lubuntu-about
|
|||||||
Package: lubuntu-about
|
Package: lubuntu-about
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: lsb-release,
|
Depends: lsb-release,
|
||||||
|
neofetch,
|
||||||
pyqt5-dev,
|
pyqt5-dev,
|
||||||
python3-cpuinfo,
|
python3-cpuinfo,
|
||||||
python3-lubuntu-about,
|
python3-lubuntu-about,
|
||||||
|
@ -79,8 +79,14 @@ def setvariables():
|
|||||||
|
|
||||||
cpu = cpuinfo.get_cpu_info()["brand"]
|
cpu = cpuinfo.get_cpu_info()["brand"]
|
||||||
|
|
||||||
# FIXME: Please, someone simplify this...
|
# FIXME: This code is horrible, it shouldn't depend on neofetch and should be reworked.
|
||||||
graphics = (run(["lspci", "-mm"], stdout=PIPE).stdout.decode('utf-8').split("\n")[2].replace("\"", "").split("VGA compatible controller ")[1].split("Controller")[0])+"Controller"
|
graphicslist = run(["neofetch", "--stdout"], stdout=PIPE).stdout.decode("utf-8").split("\n")
|
||||||
|
|
||||||
|
i = 0
|
||||||
|
while i < len(graphicslist):
|
||||||
|
if "GPU" in graphicslist[i]:
|
||||||
|
graphics = graphicslist[i].replace("GPU: ", "")
|
||||||
|
i += 1
|
||||||
|
|
||||||
freemem = memcalc(virtual_memory().free)
|
freemem = memcalc(virtual_memory().free)
|
||||||
totalmem = memcalc(virtual_memory().total)
|
totalmem = memcalc(virtual_memory().total)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user