polybar-dwm/include/modules
Malte Bargholz a625e2b79a
fix(timer_module): sleep until next full interval (#2123)
Any timer_module based module would sleep for the set interval and then
continue running. Depending on the start time of polybar this
sleep pattern might not be aligned, which causes such modules to always
update in a shifted manner.
Consider the date module as an example. If the update interval is set to
60 seconds and polybar was started at 13:37:37, polybar would update the
clock at 13:38:37, 13:39:37 and so on.
To make matters worse, if a module would perform lengthy checks this
interval might drift over time, causing even more inconsistent updating.

This patch extends the base module with a sleep_until method that calls
the corresponding function on the sleephandler. Additionally the
timer_module is extended to compute the remaining time until the next
interval passes and sleep accordingly.

Closes #2064

Co-developed-by: Dominik Töllner <dominik.toellner@stud.uni-hannover.de>

Co-authored-by: Malte Bargholz <malte@screenri.de>
2020-06-20 22:15:25 +02:00
..
meta fix(timer_module): sleep until next full interval (#2123) 2020-06-20 22:15:25 +02:00
alsa.hpp feat(alsa): add volume interval option 2018-08-07 11:52:38 +02:00
backlight.hpp feat(backlight): Add enable-scroll (#1957) 2020-01-15 16:32:17 +01:00
battery.hpp feat(battery): add %percentage_raw% token (#1756) 2019-05-14 15:01:54 +02:00
bspwm.hpp feat(bspwm): Support marked flag for focused nodes 2019-01-08 17:14:39 +01:00
counter.hpp refactor(modules): Move setup to constructor 2016-12-21 08:00:09 +01:00
cpu.hpp cpu: Consider steal time for load calculation (#1955) 2019-12-16 17:05:18 +01:00
date.hpp doc: Convert @ to \ doxygen commands 2018-11-04 19:28:27 -08:00
fs.hpp fix(fs): Calculate free bytes properly 2019-01-17 08:31:48 +01:00
github.hpp Update: Using another way to authenticate github module (#2029) 2020-03-26 12:50:42 +01:00
i3.hpp fix(i3): Surround ws names with quotes (#1798) 2019-06-04 23:34:16 +02:00
ipc.hpp ipc: Remove unused global setting 2019-11-01 11:12:40 +01:00
memory.hpp feat(mem): Add ramp and bar for swap (#1325) 2018-09-14 20:42:04 +02:00
menu.hpp feat(menu): Add expand-right option (#658) 2017-08-29 13:25:41 -07:00
mpd.hpp refactor(mpd): Replace icon-repeatone with icon-single 2018-06-23 10:14:30 +02:00
network.hpp feat(net): Add unknown-as-up option 2018-03-04 23:09:18 +01:00
pulseaudio.hpp feat(pulse): Show volume in decibels (#1894) 2019-10-09 02:13:57 +02:00
script.hpp fix(command): broken pipe when ignoring output. 2020-05-08 23:24:29 +02:00
systray.hpp wip(systray): Add module base 2017-01-01 21:28:28 +01:00
temperature.hpp feat(temp): Configurable lower bound for ramp (#1706) 2019-04-07 18:36:09 +02:00
text.hpp refactor(clang-tidy): Apply fixes 2016-12-23 15:54:06 +01:00
unsupported.hpp refactor(alsa): rename and move volume -> alsa 2018-01-23 14:33:11 +01:00
xbacklight.hpp typo: replace 'alot' with 'a lot' (#1634) 2019-01-29 17:54:38 +01:00
xkeyboard.hpp feat(xkeyboard): Customizable indicators and layouts (#1559) 2019-02-24 22:35:39 +01:00
xwindow.hpp feat(xwindow): Add label-empty 2018-04-02 00:00:16 +02:00
xworkspaces.hpp xworkspaces: Remove desktop offset member 2020-05-01 18:46:02 +02:00