OKay looks like you need to change the battery in the module. Try this, if it is set to “BAT1” then change it to “BAT0”.
Hope this helps.
that solved it,thanks
polybar -r openbox-bar:
warn: No monitor specified, using "eDP1"
error: Disabling module “battery” (reason: No suitable way to get current charge state)
laptop DEXP Aquilon
Can you help me?
Config:
[module/battery]
type = internal/battery
; Use $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = AC
full-at = 98
poll-interval = 5
time-format = %H:%M
@stopkran, run this in your terminal
ls -1 /sys/class/power_supply/
Post the output.
By the way, this is mentioned in the config you just posted above on how to find the name of your battery.
Thank you! It works.
I did not understand this line, i’m not specialist. I need TWO line at least:
; For determine your battery and adapter
; run this in your terminal: ls -1 /sys/class/power_supply/
“$” - dont need! it seems like bash variable, it scared me.
No need to be scared! So you know the “;” indicates that line is “commented out” and won’t effect the config.
Is there a way to get equal seperation for the battery indicator like the rest of the items in the polybar.
See screenshot for better understanding: http://i.imgur.com/XsOSCyl.png
Try adding this
format-padding = 1
to the module in the modules file.
I have already tried that and reloaded the polybar. But that dosen’t change anything
Do you have:
module-margin-left = 2
module-margin-right = 3
No I have this in my master.conf:
module-margin = 0
padding-right = 0
padding-left = 0
And that is the default values that work fine for everything in the polybar except the battery indicator. Any reason why the battery isn’t showed by default?
Play around with those values and see what comes of it.
You could also try adding a space between the " and the icon.
I figured it out. Add these lines:
format-discharging-padding = 1
format-charging-padding = 1
format-full-padding = 1
Result: http://i.imgur.com/afFcpEC.png
Cool. Yeah I don’t use a laptop so I was feeling around in the dark a bit there.
how did you end up gettin this to work cause i tried adding that module and polybar doesnt load:
[module/battery]
type = internal/battery
; Use $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = AC
full-at = 98
poll-interval = 5
time-format = %H:%M
Make sure that battery is correct; try changing it to BAT0
Dude! Seriously, the solution is further up the thread? Did you read this thread properly?
Please search before posting.
well my battery is BAT1 according to ls /sys/class/power_supply/

Are you seeing the information but not the icon? Or is there no battery information whatsoever?
Couple of possible issues; search the forum for “polybar battery module” and you may find the fix.