From 8180b3ac445b2780d0c16c655bd07b7deca3b728 Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 9 Jan 2024 17:47:24 +0800 Subject: [PATCH] update --- src/fetch | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/fetch b/src/fetch index 0ecc303..967076a 100755 --- a/src/fetch +++ b/src/fetch @@ -150,16 +150,14 @@ function get_shell(){ function get_cpu() { cpu=$(lscpu | awk -F '\\s*: | @' '/Model name/ {print $2}') - cpu_cores=$(lscpu | awk -F '\\s*: | @' '/^CPU\(s\):/ {print $2}') cpu_speed=$(lscpu | awk -F '\\s*: | @' '/CPU max MHz/ {print $2}') - cpu_cores=$(trim "$cpu_cores") cpu_speed=$(trim "$cpu_speed") cpu_speed=${cpu_speed%.*} cpu_speed="$((cpu_speed / 1000)).${cpu_speed:1}" cpu=$(trim "$cpu" | sed -e 's/ Gen//') - cpu+=" (${cpu_cores}) ${cpu_speed}GHz" + cpu+=" ($(nproc)) ${cpu_speed}GHz" } function get_gpu() {