perf: replace busy-loop Poll with WaitUntil frame limiter

Screensaver was consuming ~8% CPU due to ControlFlow::Poll rendering
as fast as possible. Switch to WaitUntil with configurable FPS cap.
Blank and image screensavers auto-cap at 2fps since they have no
animation, reducing CPU usage to near zero.
This commit is contained in:
kilyabin
2026-06-18 02:29:20 +04:00
parent e9cc21034a
commit 4b30a1d260
3 changed files with 20 additions and 6 deletions
+3 -2
View File
@@ -30,9 +30,10 @@ type = "blank" # pure black (default, OLED-optimal)
# ── Display settings ─────────────────────────────────────────────────────────
[display]
monitor = 0 # monitor index (0 = primary). See: scr33ny monitors
burn_shift = 2 # pixel shift for OLED burn-in prevention
monitor = 0 # monitor index (0 = primary). See: scr33ny monitors
burn_shift = 2 # pixel shift for OLED burn-in prevention
shift_interval = 120 # seconds between shifts
fps = 30 # max frames per second (blank/image auto-cap at 2)
# ── Idle daemon ───────────────────────────────────────────────────────────────