Missing battery Icon in polybar ArchLabs [Solved]


#1

i can’t seem to find the battery icon which states my battery status , tried looking for fix but none worked .


#2

@nate @Dobbie03 , check this problem as well


#3

In your $HOME/.config/polybar/config there should be sections that look like:

modules-left = config i3 menu
modules-center = clock
modules-right = pkg memory temperature coreuse network volume

Is battery one of the modules in that section? If not, add battery to one of the lines, left, center or right, and see if it works after a restart of polybar.


#4

@TheJameyBear thank you it’s solved


#5

strange, it didn’t work for me.


#6

u aded battery like this one one of the modules either left center or right :
modules-left = config i3 menu
modules-center = clock
modules-right = pkg memory temperature coreuse network volume battery


#7

i did, and i restarted as well, i got nothing.


#8

Run your command for polybar in the terminal, let me know what the output is please @chiru459


#9

ArchLabs_2018-02-01-49_614x233


#10


#11

try adding the bar to the I3 bars as well


#12

To execute youar polybar to test for any errors, in a terminal type the following:

polybar -r openbox-bar

Tell us what the error is.


#13

ArchLabs_2018-02-03-40_639x73


#14

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.


#15

that solved it,thanks


#16

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


#17

@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.


#18

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.


#19

No need to be scared! So you know the “;” indicates that line is “commented out” and won’t effect the config.


#20

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