Skip to content

v0.1.8 visualizers, mouse, zig 0.17, runtime libmpv - #12

Merged
zblauser merged 1 commit into
mainfrom
v0.1.8-visualizers-mouse
Oct 9, 2026
Merged

zblauser merged 1 commit into
mainfrom
v0.1.8-visualizers-mouse

Conversation

@zblauser

@zblauser zblauser commented Oct 9, 2026

Copy link
Copy Markdown
Owner

new

  • Ctrl+V visualizer view: bars, cube, orbit, rings, plasma, plus user .vis ASCII flipbooks from ~/.config/hum/visualizers/ (example: examples/visualizers/pulse.vis). theme colored; driven by mpv astats loudness, left/right balance and zero-crossing rate. now playing stays below, the queue sits beside it from 96 columns.
  • mouse: wheel scrolls, click selects / click again plays, click the progress bar to seek, click scope/filter labels, left/right click cycles visualizers, queue panel click-to-play and drag to reorder-ish (also on the Ctrl+Q screen). mouse=off disables.
  • bracketed paste: pasted text goes into search as text; newlines and escapes can't fire keys.
  • mp3 durations from the Xing/Info header or CBR math (two frame validated sync); cached zero duration rows refresh on the next scan.
  • MPRIS on Linux/BSD via mpv-mpris; now-playing widgets show the track title.
  • hum doctor reports where libmpv loaded from (or why it couldn't) and flags ytdlp builds older than 60 days; the TUI says so too when a youtube track fails.

changes

  • officially ported to zig 0.17; no C headers left anywhere (@cImport is gone in 0.17).
  • libmpv is dlopen'd at runtime, not linked. builds need nothing but zig, so one macos-14 job cross-compiles every target and the universal macOS binary is back (intel included).
  • homebrew tap installs the prebuilt binary (no compiling; there are no Intel mac zig/mpv bottles).
  • Ctrl+C/SIGTERM stop playback even when mpv falls back to JACK (libjack installs its own signal handlers on systems without a sound server); hum reasserts its handlers once audio is up.
  • hardening: bidi override characters stripped from all remote text; .vis files parsed as hostile input (caps, sanitize, injection payload tests).
  • cleanup: shared helpers instead of copies (config.Key, fsutil.makeTemp, mediaKey, box/row helpers), named timeouts, non-header comments removed; zig build clean added.
  • README: new layout and visualizer GIFs, key/mouse tables, config and .vis docs.

tests

  • zig build test (110 tests, debug + releaseSafe), zig build check, zig fmt --check.
  • release binaries: macOS universal (intel), linux x86_64 on debian 12 and ubuntu 22.04 (libmpv1), linux arm64 (debian 12, emulated), with and without libmpv. freeBSD cross-compiled only. linux binary needs glibc ≥ 2.28.
  • TUI driven headlessly: every screen and visualizer at 60×20 / 100×28 / 140×40, all rows exact width; resize, mouse, paste and signal teardown.

@zblauser zblauser self-assigned this Oct 9, 2026

@zblauser zblauser left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mouse support needs to be more thoroughly audited

@zblauser
zblauser merged commit 3426e65 into main Oct 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant