From 37cb2edf8bc1e35f7a00e8a0a3f5fb74188861bf Mon Sep 17 00:00:00 2001 From: ivan-boikov Date: Sun, 22 Dec 2024 16:44:05 +0100 Subject: Fix battery detection --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 5b9c0cc..3c2b498 100755 --- a/configure +++ b/configure @@ -16,7 +16,7 @@ done sed -i "/cpu_perc/a\\\\t{ temp, \"%s° \", \"$CPUtemp\"}," config.h # detect battery -for BAT_path in /sys/class/power_supply/BAT* +for BAT_path in `find /sys/class/power_supply -name BAT*` do BAT="$(basename "$BAT_path")" sed -i "/BATSTATE/a\\\\t{ battery_state, \"%s]\", \"$BAT\"}," config.h -- cgit v1.2.3