Building a Custom Battery Percentage Output

Specs: Current Manjaro/xfce/One Netbook A1

Due to the A1’s buggy battery output, the battery stops charging at 80% (both Manjaro and Win10 see it as fully charged). This means that at 0%, the battery has at least 20% left.

Is there a way to make a battery output use negative numbers up to -20% in xfce’s genmon applet?

I’m guessing that the first problem would be rendering an accurate output in negative numbers, if only because the rate of battery discharge in positive numbers depends on cpu/wifi/screen use rather than simple uptime.

I’m also guessing that this approach is impossible, but I wanted at least to confirm it with users that know more than me.

You can put a bash script in genmon. And in that script you take the reported value and make a simple mathematical formula of it. You parse the output with grep, sed or awk but i am not very proficient with that to give a precise example.

Thank you for the quick response. Your idea is beyond my scripting abilities, but it makes sense, from what I can understand about it. (I’m an old English major; we usually count on our fingers when we’re not dragging our knuckles :slight_smile: )