7 lines
193 B
Bash
Executable File
7 lines
193 B
Bash
Executable File
#!/bin/bash
|
|
echo - | awk "{printf \"%.1f\", \
|
|
$(( \
|
|
$(cat /sys/class/power_supply/BAT0/current_now) * \
|
|
$(cat /sys/class/power_supply/BAT0/voltage_now) \
|
|
)) / 1000000000000 }" ; echo "W "
|