From 14fae84695f490dc3292a1e94ff57aed5b9bf248 Mon Sep 17 00:00:00 2001 From: Blista Kanjo Date: Wed, 19 Jul 2023 02:10:18 -0400 Subject: refactor: limit widget to displaying 8 cpu cores --- .local/bin/awesome-widgets/widget-cpu_usage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/awesome-widgets/widget-cpu_usage b/.local/bin/awesome-widgets/widget-cpu_usage index 53dab4d..4be33eb 100755 --- a/.local/bin/awesome-widgets/widget-cpu_usage +++ b/.local/bin/awesome-widgets/widget-cpu_usage @@ -3,7 +3,7 @@ # Cache in tmpfs to improve speed and reduce SSD load cache=/tmp/cpubarscache -stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) +stats=$(awk '/cpu[0-7]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) [ ! -f $cache ] && echo "$stats" > "$cache" old=$(cat "$cache") printf " 🫀 " -- cgit v1.2.3