Open GGORG0 opened 3 years ago
I don't know if this is related, but I had to manually enable the Battery line in my ~/.config/neofetch/config.conf
file (which I didn't even know I had...). However, mine displays as Battery1: 100%
.
I could be wrong, but I have a hunch that FetchCord is just grepping for a line containing Battery:
(or something similar), and since the 1
is in the way, this fails.
I'm not too surprised it shows up like this actually. On my previous laptop, I wrote my own script to get info from upower
to show battery percentage. However, when copying that script to my new laptop it didn't work. A quick check revealed that while my previous laptop had information at /org/freedesktop/UPower/devices/battery_BAT0
, my new one didn't have a BAT0, but instead /org/freedesktop/UPower/devices/battery_BAT1
. Neofetch probably doesn't show a number if your battery is BAT0
but for all others it does?
Either way, hope this helps you, and/or @MrPotatoBob in some way.
Yeah, I believe the change would need to be implemented in fetch_cord/computer/Computer.py
.
Either in this function, or possibly even requiring a change here?
I don't know Python at all, and am not entirely sure what's going on here. In v2.6.1 it looked like the change may have been simpler, but in the latest commit it seems like it would be harder to add an exception like this. And, not knowing any Python, the only method I can think of is to do a RegEx check along the lines of Battery[0-9]*:
(or Battery[\d]*:
if supported).
Edit:
Nevermind actually, it looks like this issue is already known about: #115
Debug info
Requested item
Motherboard/Laptop: MSI PE70 6QD plus battery percentage not working (
[KeyError]: 'Battery:'
)Other notes
(nothing :) )