Missing battery Icon in polybar ArchLabs [Solved]


#21

Try adding this

format-padding = 1

to the module in the modules file.


#22

I have already tried that and reloaded the polybar. But that dosen’t change anything :frowning:


#23

Do you have:

module-margin-left       = 2
module-margin-right      = 3

#24

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?


Polybar spacing
#25

Play around with those values and see what comes of it.

You could also try adding a space between the " and the icon.


#26

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


#27

Cool. Yeah I don’t use a laptop so I was feeling around in the dark a bit there.


#28

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


#29

Make sure that battery is correct; try changing it to BAT0


#30

Dude! Seriously, the solution is further up the thread? Did you read this thread properly?

Please search before posting.


#31

well my battery is BAT1 according to ls /sys/class/power_supply/


#32

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.