paleofetch
paleofetch copied to clipboard
Add a fallback if theirs no /sys/class/power_supply/BAT0/
I use Gentoo and I have battery support disabled in my kernel completely since I am on a desktop so theirs no /sys/class/power_supply/BAT0/ at all instead of saying something like no battery detected it crashes
nonetrix@archbtw ~/Downloads/paleofetch-master $ ./paleofetch
-`
.o+` nonetrix@archbtw
`ooo/ ----------------
`+oooo: OS: x86_64
`+oooooo: Host: B450 AORUS PRO WIFI Default string
-+oooooo+: Kernel: 5.10.27-gentoo
`/:-:++oooo+: Uptime: 24 mins
paleofetch: Unable to get battery information
Also I just noticed my hostname is archbtw old habits die slowly
this is the same case for me, I am also using gentoo
A temporary solution is to just uncomment get_battery_percentage on config.h and then recompile.