distatus / battery

cross-platform, normalized battery information library
MIT License
249 stars 36 forks source link

Aggregate multiple batteries into one state #4

Open tv42 opened 8 years ago

tv42 commented 8 years ago

I feel like many apps will only want to display a single battery indicator -- it's unlikely the user cares whether their laptop hardware has a single battery controller, or multiple. To avoid lots of (bad) copies of this logic, or probably more likely apps reporting just the first battery, perhaps provide a func Summarize() (*Battery, error)?

dmitshur commented 8 years ago

To avoid lots of (bad) copies of this logic, or probably more likely apps reporting just the first battery

That's a good argument.

KenjiTakahashi commented 8 years ago

Sounds reasonable, yes. PRs welcome :-). Otherwise, I'll try to get to this, as time/will permits.