Split out Linux battery implementation and support multiple batteries

Some notebooks, like the ThinkPad X240 and X250 have two batteries
installed. So far only one of the batteries have been checked by
the tint2 widget making it more or less useless on those systems.

After this patch tint2 will aggregate the data from all batteries
instead.
This commit is contained in:
Sebastian Reichel
2015-08-05 00:17:32 +02:00
parent 84f9f6d0cd
commit ae375ae526
4 changed files with 300 additions and 177 deletions

View File

@@ -79,4 +79,10 @@ int resize_battery(void *obj);
void battery_action(int button);
#ifdef __linux
gboolean init_linux_batteries();
void free_linux_batteries();
void update_linux_batteries(enum chargestate *state, gint64 *energy_now, gint64 *energy_full, int *seconds);
#endif
#endif