Skip to content

[Bug]: Battery module doesn't update unless I reload  #2649

@HotMonkeyWings

Description

@HotMonkeyWings

Checklist

  • I have read the appropriate section in the contributing guidelines
  • I believe this issue is a problem with polybar itself and not a misconfiguration on my part
  • I have searched for other open and closed issues that may have already reported this problem
  • I have checked the known issues page for this problem.
  • I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

  1. Add battery module to polybar
  2. Run polybar

Minimal config

[module/battery]
type = internal/battery

full-at = 99
low-at = 5

battery = BAT1
adapter = ACAD

format-charging =  <label-charging>
format-discharging = <ramp-capacity> <label-discharging>

ramp-capacity-4 = 
ramp-capacity-3 = 
ramp-capacity-2 = 
ramp-capacity-1 = 
ramp-capacity-0 = 

label-charging = %percentage%
label-discharging = %percentage%
label-full = FULL

label-charging-foreground = ${colors.green}
label-discharging-foreground = ${colors.yellow}
label-full-foreground = ${colors.green}

Polybar log

notice: Parsing config file: /home/monkeywings/.config/polybar/config.ini
notice: Listening for IPC messages (PID: 4348)
notice: pulseaudio: using default sink alsa_output.pci-0000_05_00.6.analog-stereo
notice: Loaded font "JetBrains Mono:style=Regular:size=14" (name=FreeSans, offset=1, file=/usr/share/fonts/gnu-free/FreeSans.otf)
notice: Loaded font "JetBrains Mono:style=Bold:size=14" (name=FreeSans, offset=2, file=/usr/share/fonts/gnu-free/FreeSansBold.otf)
notice: Loaded font "Iosevka,Iosevka Nerd Font:style=Regular,Book:size=26" (name=Iosevka, offset=2, file=/usr/share/fonts/TTF/Iosevka Nerd Font Complete Mono.ttf)

Expected behavior

Battery module updates the percentage every 5 seconds. (I've tried adding poll-interval in the config, but no luck.)

Actual behavior

Battery module stays at a fixed percentage until I decide to reload my window manager (Ultimately reloading polybar).

Window Manager and Version

bspwm-git 0.9.10.r36.g1560df3-1

Linux Distribution

Arch Linux

Polybar version

polybar-git 3.6.1.r20.g3079acb3-1

Additional Context / Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions