log /dev/shm/battery
authorDobrica Pavlinušić <dpavlin@rot13.org>
Thu, 29 Jun 2023 10:55:02 +0000 (12:55 +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 f8976e2..a024782 100755 (executable)
@@ -292,6 +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
                        elif [ -e "$power_supply"/charge_now ]; then
                                CHARGE_NOW="$(cat "$power_supply"/charge_now)"
                                CHARGE_FULL="$(cat "$power_supply"/charge_full_design)"