Making Awesome bar look better

This commit is contained in:
Chris Cochrun 2021-04-19 05:57:06 -05:00
parent 766bf7f52f
commit deef4f3192
6 changed files with 85 additions and 26 deletions

View file

@ -1,3 +1,5 @@
#!/bin/bash
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)
#!/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
mpstat 1 1 | rg Average | awk '{print $3+$4+$5}' | sed 's/\(.*\)/\1%/g'