Battery Level Notification Doesn't Show Until I3 Bar Is Shown
jdholtz opened this issue · comments
Describe the bug
An i3-nagbar
only shows up once the i3 status bar is shown (specifically in the battery_level module). For example, if I my battery drops to 10% (assuming I have the threshold at 10%), the nagbar should appear right away. However, it only appears once I show the i3 bar. This is a problem because it essentially makes the nagbar unnecessary in the first place (Needing to show the i3 bar will already allow me to view the battery myself).
Your py3status version
py3status version 3.48 (python 3.10.9) on i3
To Reproduce
Steps to reproduce the behavior along with your py3status configuration (filter out any private values):
- Add module
battery_level
with the following configuration:
general {
interval = 5
}
order += "battery_level"
battery_level {
format = "{status} {percent}% {time_remaining}"
format_down = "No battery"
hide_seconds = true
notify_low_level = true
threshold_bad = 10
threshold_degraded = 20
threshold_full = 100
}
- Set the i3bar to only be shown when the modifier is pressed:
bar {
status_command py3status -c /path/to/config
mode hide
hidden_state hide
modifier Mod4
}
- Reload to set the configuration and either get your battery down to the
threshold_degraded
level or increase it in the configuration. - See how the i3-nagbar only pops up once you show the bar (using Mod4)
Expected behavior
I expect the i3-nagbar to be shown right away as that is the point of having the notification system. Seeing it only when I show it negates its point because I can just check the battery level at that point.
Additional context
I thought this worked as expected before (a few months ago), but I'm not sure if I am remembering that correctly.
I don't remember the details, but https://i3wm.org/docs/i3bar-protocol.html say you can try adding stop_signal 0
to your config. It's also documented here. https://py3status.readthedocs.io/en/stable/user-guide/configuration/#configuring-a-py3status-module
That fixed both this issue and #2135! I appreciate the quick response and I will be sure to read the documentation more thoroughly before filing another issue. Thanks!