adding idk things

This commit is contained in:
Chris Cochrun 2021-08-25 05:13:50 -05:00
parent e75be2bdfa
commit bb7a0dc58e
3 changed files with 24 additions and 0 deletions

7
scripts/cpu-plasma.2s.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
# awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \
# <(rg 'cpu ' /proc/stat) <(sleep 1;rg 'cpu ' /proc/stat)
# echo 100 - $(mpstat | rg all | cut -d \ -f43) | bc
cpu="$(mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g')"
echo "$cpu | color=#5af78e font='VictorMono Nerd Font' size=11"