ocdway/scripts
ocpway a9254fc70e Wake on click instantly instead of the next 0.5s tick
The main loop slept on time.sleep(event_deadline()), so a click sat in
the datagram socket until the next 0.5s timer tick woke the loop. That
added up to ~450ms of latency before the click affected state.json, on
top of waybar's 1s re-poll. Replace the sleep with select() on the
socket: select returns the moment a datagram arrives, so the loop
drains and writes the click within milliseconds (measured 29ms) while
still bounding idle sleep by the next timer deadline. Rotation cadence
and click-during-fetch behavior are unchanged.

The waybar custom-module interval stays 1: fractional intervals below
1s break custom modules (Waybar #4894 turns 0.5 into a 1ms busy loop),
so the 0-1s re-poll is the floor and not safely tunable.
2026-07-30 05:03:11 +03:00
..
ocd-waybar Wake on click instantly instead of the next 0.5s tick 2026-07-30 05:03:11 +03:00
ocd-waybar-ctl Fix hang on click and reconnect after daemon restart 2026-07-30 04:43:45 +03:00