yambar/modules
Daniel Eklöf a342e036ad
module/battery: don’t reset poll timeout on irrelevant udev notifications
We may receive udev notifications for the power-supply subsystem, that
aren’t for us.

Before this patch, this would result in a new poll() call, with
timeout being set to m->poll_interval again. That is, the poll timeout
was being reset.

In theory, this means we could end up in a situation where the battery
status is never updated.

This patch fixes it by tracking how much time is left of the poll
interval. The interval is reset either when the timeout has occurred,
or when we receive an udev notification that _is_ for us.

Hopefully closes #305
2023-07-09 11:18:30 +02:00
..
alsa.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
backlight.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
battery.c module/battery: don’t reset poll timeout on irrelevant udev notifications 2023-07-09 11:18:30 +02:00
clock.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
cpu.c modules: change min poll interval from 500ms to 250ms 2022-12-27 13:20:31 +01:00
disk-io.c modules: change min poll interval from 500ms to 250ms 2022-12-27 13:20:31 +01:00
dwl.c modules/dwl: handle the appid status 2023-03-26 16:08:55 +09:00
foreign-toplevel.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
i3-common.c modules: Implement workspace move event 2022-12-13 16:21:55 +01:00
i3-common.h modules: Implement workspace move event 2022-12-13 16:21:55 +01:00
i3-ipc.h module/i3: use our own copy of i3/ipc.h 2019-03-31 12:08:44 +02:00
i3.c i3: add "native" sway/i3 sort mode 2023-03-24 17:48:26 +01:00
label.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
mem.c modules: change min poll interval from 500ms to 250ms 2022-12-27 13:20:31 +01:00
meson.build modules: meson: add missing ‘m’ (math) dependency 2022-12-17 18:26:25 +01:00
mpd.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
network.c module/network: allow poll-interval == 0 2023-04-08 20:06:07 +00:00
pipewire.c modules/pipewire: change type of volume from uint8 to uint16 2023-01-16 10:29:16 +01:00
pulse.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
removables.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
river.c module/river: add support for ‘layout’ events 2023-01-12 18:15:16 +01:00
script.c modules: change min poll interval from 500ms to 250ms 2022-12-27 13:20:31 +01:00
sway-xkb.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
xkb.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00
xwindow.c module: const:ify ‘module’ argument to module->description() 2022-12-14 12:05:17 +01:00