Skip to content

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

Description

@nonetrix

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions