From 1a0b5bc0545a001e4248f0ac2decbff5e11a8b3b Mon Sep 17 00:00:00 2001 From: xiaoqiang zhao Date: Mon, 25 Dec 2023 23:19:41 +0800 Subject: [PATCH] add loongarch cpu support Signed-off-by: xiaoqiang zhao --- neofetch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/neofetch b/neofetch index 48b96d21..d104d8e6 100755 --- a/neofetch +++ b/neofetch @@ -2206,6 +2206,10 @@ get_cpu() { [[ -z "$cpu" ]] && cpu="$(awk -F':' '/family/ {printf $2; exit}' "$cpu_file")" ;; + "loongarch"*) + cpu="$(awk -F':' '/Model Name/ {print $2; exit}' "$cpu_file")" + ;; + *) cpu="$(awk -F '\\s*: | @' \ '/model name|Hardware|Processor|^cpu model|chip type|^cpu type/ {