From a8a6c3a400174cf476ec8e75bb2e5a5b0afb34da Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 17 Mar 2023 18:24:01 +0100 Subject: Script sync --- .scripts/stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.scripts/stats') diff --git a/.scripts/stats b/.scripts/stats index a71b40f..8e4012a 100755 --- a/.scripts/stats +++ b/.scripts/stats @@ -10,7 +10,7 @@ mem=$(free -m | awk '/^Mem:/{printf("%.1fGb\n",$3/1000)}') swap=$(free -m | awk '/^Swap:/{printf("%.1fGb\n",$3/1000)}') cpu=$(awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else printf "%.1f%", (($2+$4-u1) * 100 / (t-t1)); }' <(grep 'cpu ' /proc/stat) <(sleep .5; grep 'cpu ' /proc/stat)) -mouse=$(upower -d | grep -A 10 mouse | awk '/percentage/{printf("| M%s ",$2)}') +mouse=$(upower -d | grep -m 1 -A 10 mouse | awk '/percentage/{printf("| M%s ",$2)}') if bluetooth | grep -q on; then btdev=$(bluetoothctl info) -- cgit v1.2.3