summaryrefslogtreecommitdiffstats
path: root/.local/bin/status/sb-cpu
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-08-16 22:10:46 +0200
committerJoe <bousset.rudy@gmail.com>2022-08-16 22:10:46 +0200
commit0f9bbf914bdd64c57effda954fa454f5bc8472fd (patch)
tree89a0dd9ea867e1caa178b18b62032d0f01bc5f99 /.local/bin/status/sb-cpu
parentupdate (diff)
downloaddotfiles-bsd-0f9bbf914bdd64c57effda954fa454f5bc8472fd.tar.gz
dotfiles-bsd-0f9bbf914bdd64c57effda954fa454f5bc8472fd.tar.bz2
dotfiles-bsd-0f9bbf914bdd64c57effda954fa454f5bc8472fd.tar.xz
dotfiles-bsd-0f9bbf914bdd64c57effda954fa454f5bc8472fd.tar.zst
dotfiles-bsd-0f9bbf914bdd64c57effda954fa454f5bc8472fd.zip
updat
Diffstat (limited to '.local/bin/status/sb-cpu')
-rwxr-xr-x.local/bin/status/sb-cpu2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/status/sb-cpu b/.local/bin/status/sb-cpu
index 7ff7aca..f6769a1 100755
--- a/.local/bin/status/sb-cpu
+++ b/.local/bin/status/sb-cpu
@@ -3,6 +3,7 @@
ncpu=$(sysctl -n hw.ncpu)
ncpu=$((ncpu - 1))
cpu=""
+printf " "
for i in $(seq 0 $ncpu); do
case $(sysctl -n dev.cpu.$i.cx_usage | cut -d'.' -f1 | awk '{printf "%d\n", $1 / 12.5}') in
"0") printf "▁";;
@@ -16,4 +17,3 @@ for i in $(seq 0 $ncpu); do
"8") printf "█";;
esac;
done
-# top | sed -n 3p | awk '{print $10}' | cut -d '.' -f1 | awk '{print " " 100 - $1 "%"}'