diff --git a/bin/st-power b/bin/st-power index 1477613..f1ad8df 100755 --- a/bin/st-power +++ b/bin/st-power @@ -17,6 +17,11 @@ #CURRENT=$(cat /sys/class/power_supply/BAT*/current_now) #POWER=$(echo "scale=2; $VOLTAGE*$CURRENT/1000000000000" | bc) +# freebsd +#CHARGE=$(acpiconf -i 0 | grep "Remaining capacity" | awk '{print $3}') +#POWER_RAW=$(acpiconf -i 0 | grep "Present rate:" | awk '{print $3}') +#POWER="$(echo "scale=1; $POWER_RAW/1000" | bc)W" + # if it is present, just divide it to watts (from micro watts on thinkpads, perhaps something else on other platforms) POWER=$(cat /sys/class/power_supply/BAT*/power_now) POWER="$(echo "scale=2; $POWER/1000000" | bc)W"