Ñò B3Kc @ s d e f d „ ƒ YZ d S( t dstat_pluginc B s2 e Z d Z d „ Z d „ Z d „ Z d „ Z RS( sD Percentage of remaining battery power as reported by ACPI. c C s1 t | _ d | _ d | _ d | _ d | _ d S( Nt batteryt pi i" ( t filet namet typet widtht scale( t self( ( s! /usr/share/dstat/dstat_battery.pyt __init__ s c C s¬ g } x• t i d ƒ D]„ } x{ t d | d ƒ i ƒ D]_ } | i ƒ } t | ƒ d j o q7 n | d d j o" | d d j o | i | ƒ q7 q7 Wq W| i ƒ | S( Ns /proc/acpi/battery/s /statei i s present:i t yes( t ost listdirt dopent readlinest splitt lent appendt sort( R t retR t linet l( ( s! /usr/share/dstat/dstat_battery.pyt vars s " c C s( g } | i D] } | | i ƒ q ~ S( N( R t lower( R t _[1]R ( ( s! /usr/share/dstat/dstat_battery.pyt nick s c C s' x | i D]} xn t d | d ƒ i ƒ D]R } | i ƒ } t | ƒ d j o q+ n | d d j o t | d ƒ } Pq+ q+ Wxn t d | d ƒ i ƒ D]R } | i ƒ } t | ƒ d j o qœ n | d d j o t | d ƒ } Pqœ qœ W| o | d | | i |