log battery *_now
authorDobrica Pavlinušić <dpavlin@rot13.org>
Thu, 29 Jun 2023 11:20:17 +0000 (13:20 +0200)
committerDobrica Pavlinušić <dpavlin@rot13.org>
Sun, 2 Jul 2023 11:12:08 +0000 (13:12 +0200)
.config/sxmo/hooks/sxmo_hook_statusbar.sh

index a024782..71a53e1 100755 (executable)
@@ -292,7 +292,7 @@ set_battery() {
                if [ "$(cat "$power_supply"/type)" = "Battery" ]; then
                        if [ -e "$power_supply"/capacity ]; then
                                PCT="$(cat "$power_supply"/capacity)"
-                               echo $( date +%Y-%m-%dT%H:%M:%S ) $PCT >> /dev/shm/battery
+                               echo $( date +%Y-%m-%dT%H:%M:%S ) $PCT $(cat "$power_supply"/*_now ) >> /dev/shm/battery
                        elif [ -e "$power_supply"/charge_now ]; then
                                CHARGE_NOW="$(cat "$power_supply"/charge_now)"
                                CHARGE_FULL="$(cat "$power_supply"/charge_full_design)"