Commit Graph

2 Commits

Author SHA1 Message Date
107b9723d5 donut: remove time-based degradation for consistent animation
Remove three mechanisms that intentionally degraded the screensaver
over time, causing it to appear frozen after extended runtime:

- Brightness dimming curve (faded palette to 30% over ~15min)
- Projection framerate skip (reduced 3D updates from 24fps to 6fps)
- Deep sleep after 2hr (dropped to 1fps)

The clock drift and matrix text changes already provide adequate
OLED burn-in protection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-18 15:30:59 +00:00
e686b6396d Add spinning donut screensaver with matrix rain
Terminal screensaver written in C, triggered by tmux lock-after-time
(180s idle), bind S, or `donut` alias. Features:

- Spinning torus with precomputed trig tables, randomized rotation
- Matrix rain overlay — donut luminance colors the rain characters
- 64-shade teal foreground palette with gradual dimming over time
- Chunky 7x5 clock with shadow, blinking colon, periodic drift
- Activity time display below clock (read from heartbeat state file)
- Rim lighting and ambient occlusion on donut edges
- RLE escape state machine — only emits SGR on shade transitions
- Row-skip rendering — empty/leading/trailing regions use cursor jumps
- Projection runs at adaptive rate (24fps bright, 6fps dim)
- select()-based frame pacing, deep sleep after 2hr (1fps)
- Resume detection — flushes stale PTY output after sleep/lock
- Mouse click to quit (SGR + X11 protocols, release filtered)
- write_all() retries partial writes, SIGPIPE handled gracefully
- Alternate screen buffer preserves shell scrollback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-27 16:56:44 +00:00