lcpz / lain

Awesome WM complements
GNU General Public License v2.0
1.06k stars 212 forks source link

Fix ac detection for bat widget. #484

Closed andersfugmann closed 3 years ago

andersfugmann commented 3 years ago

Multiple power sources may exist under /sys/class/power_supply/. Durring autodetection (get_batteries), will case the detected ac to be reset to 'AC0' if a power source not starting with BAT or AC.

This change skips updating the name of the ac device if the devices does not start with 'AC'