Open ArgentumCation opened 1 month ago
https://github.com/ArgentumCation/mirafetch/blob/main/src/info/linuxinfo.rs#L441
We need to return None
if the iterator is empty.
Also from @demize:
need to look into how this is handled
/sys/class/power_supply/macsmc-battery/capacity
seems to be the path we'd look for
find -L /sys/class/power_supply/* -maxdepth 1 -name capacity works without having to redirect stderr
the fast logic is probably to glob for capacity, validate type, then check capacity
Expected behavior:
Battery: 69%
Actual behavior:Battery