paleofetch icon indicating copy to clipboard operation
paleofetch copied to clipboard

Add a fallback if theirs no /sys/class/power_supply/BAT0/

Open nonetrix opened this issue 4 years ago • 3 comments

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

nonetrix avatar Jul 04 '21 22:07 nonetrix

Also I just noticed my hostname is archbtw old habits die slowly

nonetrix avatar Jul 04 '21 22:07 nonetrix

this is the same case for me, I am also using gentoo

spcbfr avatar Aug 08 '21 20:08 spcbfr

A temporary solution is to just uncomment get_battery_percentage on config.h and then recompile.

FlookyMonster avatar Oct 07 '21 11:10 FlookyMonster