The arch-ubuntu-suse flow looks buggy:
battery_state=$(cat $battery_path/energy_now)
battery_current=$battery_path/energy_now
...
if [ $battery_state == 'Discharging' ]; then
...
now=$(cat $battery_current)
full=$(cat $battery_full)
BATT_PCT=$((100 * $now / $full))
Note $now is same as $battery_state, yet the former is used in calculation while latter in string comparison.
Don't have a setup to verify this though.
The arch-ubuntu-suse flow looks buggy:
Note
$nowis same as$battery_state, yet the former is used in calculation while latter in string comparison.Don't have a setup to verify this though.