scripts: add really simple script for BAT avg
This commit is contained in:
parent
1810914530
commit
f6695c8e02
3
scripts/battery.sh
Executable file
3
scripts/battery.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
count=$(acpi -b | wc -l)
|
||||||
|
sum=$(acpi -b | grep -Eo '[0-9]{1,3}%' | tr -d '%' | xargs | sed -e 's/ /+/g' | bc)
|
||||||
|
echo $((sum / count))%
|
Loading…
x
Reference in New Issue
Block a user