This commit is contained in:
Chris Cochrun 2022-09-09 05:09:25 -05:00
parent 7e6b91a1c6
commit 54218677ff
7 changed files with 24 additions and 11 deletions

7
scripts/batcurrent Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env sh
echo - | awk "{printf \"%.1f\", \
$(( \
$(cat /sys/class/power_supply/BAT1/current_now) * \
$(cat /sys/class/power_supply/BAT1/voltage_now) \
)) / 1000000000000 }" ; echo " W "