diff --git a/scripts/battery.sh b/scripts/battery.sh new file mode 100755 index 0000000..33cdb68 --- /dev/null +++ b/scripts/battery.sh @@ -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))%