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

@@ -78,7 +78,7 @@ set( SOURCES src/config.c
src/util/window.c )
if( ENABLE_BATTERY )
set( SOURCES ${SOURCES} src/battery/battery.c )
set( SOURCES ${SOURCES} src/battery/battery.c src/battery/linux.c)
add_definitions( -DENABLE_BATTERY )
endif( ENABLE_BATTERY )