aboutsummaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorBlista Kanjo2023-07-19 02:10:18 -0400
committerBlista Kanjo2023-07-19 02:10:18 -0400
commit14fae84695f490dc3292a1e94ff57aed5b9bf248 (patch)
treecfc7d54637a4bb0faefe491166d61e56eed9cbe9 /.local/bin
parentda05943c45ea06f2e1444b1918332a5f0fe381fc (diff)
refactor: limit widget to displaying 8 cpu cores
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/awesome-widgets/widget-cpu_usage2
1 files changed, 1 insertions, 1 deletions
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 " 🫀 "