From 95b0076445f6f5e2cdca5f7abf16796e759eec81 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sun, 23 Aug 2020 13:17:16 +0200 Subject: [PATCH] Expanded cpu name detection --- bpytop.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bpytop.py b/bpytop.py index aa54e83..ed44920 100755 --- a/bpytop.py +++ b/bpytop.py @@ -4095,10 +4095,12 @@ def get_cpu_name() -> str: name = nlist[nlist.index("CPU")+1] elif "Ryzen" in name: name = " ".join(nlist[nlist.index("Ryzen"):nlist.index("Ryzen")+3]) + elif "Duo" in name and "@" in name: + name = " ".join(nlist[:nlist.index("@")]) elif "CPU" in name and not nlist[0] == "CPU": name = nlist[nlist.index("CPU")-1] - return name + return name.replace("Processor ", "").replace("CPU ", "").replace("(R)", "").replace("(TM)", "").replace("Intel ", "") def create_box(x: int = 0, y: int = 0, width: int = 0, height: int = 0, title: str = "", title2: str = "", line_color: Color = None, title_color: Color = None, fill: bool = True, box = None) -> str: '''Create a box from a box object or by given arguments'''