def get_desktopid(deid, wmid): deid = deid.lower() wmid = wmid.lower() if deid != "n/a" and deid in desktops: desktopid = deid elif deid == "n/a" and wmid in windowmanagers: desktopid = wmid else: print("Unknown DE/WM, contact us on github to resolve this.") desktopid = 'unknown' return desktopid
intelcpus = infos["intelcpus"] gpus = infos["gpus"] multigpus = infos["multigpus"] distros = infos["distros"] versions = infos["versions"] windowmanagers = infos["windowmanagers"] desktops = infos["desktops"] terminals = infos["terminals"] shells = infos["shells"] hosts = infos["hosts"] motherboards = infos["motherboards"] hostlist = infos["hostlist"] terminallist = infos["terminallist"] # desktops if deid.lower() == "unity": iUnity(wmid) args = parse_args() def get_host(hostlist): hostsplit = hostline.split() hostid = [] for line in range(len(hostsplit)): if hostsplit[line] in hostlist: hostid.append(hostsplit[line].rstrip('\n')) try: hostid = ' '.join(hostid) except IndexError: hostid = []
try: shells[shellid.lower()]() except KeyError: print("Unsupported Shell, contact me on guthub to resolve this.(Keyerror)") Unknown_shell() try: if sysosid.lower() != "macos": hosts[hostid.lower()]() except KeyError: print("Unknown Host, contact us on github to resolve this.(Keyerror)") Unknown_host() try: if deid != "N/A" and sysosid.lower() != "macos": desktops[deid.lower()]() except KeyError: print("Unsupported De contact me on github to resolve this.(Keyerror)") Unknown_de_wm() try: if deid == "N/A" and sysosid.lower() != "macos": windowmanagers[wmid.lower()]() except KeyError: print("Unsupported Wm contact me on github to resolve this.(Keyerror)") Unknown_de_wm() try: if sysosid.lower() != "macos": distros[sysosid.lower()]() except KeyError: