5 lines
148 B
Bash
Executable file
5 lines
148 B
Bash
Executable file
#!/bin/bash
|
|
power_now=$(cat /sys/class/power_supply/BAT0/power_now)
|
|
watts=$(printf "%.1f" "$(echo "$power_now / 1000000" | bc -l)")
|
|
echo "$wattsW"
|
|
|