--- panel-plugin/battery.c.orig 2008-09-04 22:53:40.000000000 +0200 +++ panel-plugin/battery.c 2008-09-08 18:12:12.000000000 +0200 @@ -382,6 +382,7 @@ rate = last_rate; } +#ifdef __linux__ charge = (((float)ccapacity)/((float)lcapacity))*100; if ( last_acline ) @@ -394,6 +395,20 @@ last_acline = acline; +#elif __FreeBSD__ + charge = acpistate->percentage; + + if ( last_acline ) + time_remaining = acpistate->rtime; + else + time_remaining = acpistate->rtime; + + if ( time_remaining < 0 ) + time_remaining = 0; + + last_acline = acline; +#endif + } #ifdef __linux__ else {