Skip to content

zmenu v0.4.0

Latest

Choose a tag to compare

@alexrios alexrios released this 12 Aug 12:00
· 1 commit to main since this release
v0.4.0
ca24613

Highlights

  • Replaced the blocking stdin thread with a cancelable std.Io.Future reader based on std.Io.File.readStreaming. Escape and Ctrl+C now stop pending reads safely even when the producer keeps its pipe open.
  • Preserved the selected display through adaptive window resizing, including display-relative centering fallbacks.
  • Consolidated command-line parsing into one strict pass. Unknown options, positional arguments, duplicates, missing values, and incompatible informational options now fail before SDL initialization.
  • Made history writes crash-safe with a same-directory temporary file, flush/sync, and atomic replacement. Failed saves preserve the previous history file and keep the state dirty for retry.
  • Added a cooperative global exit budget for synchronous feature hooks.
  • Updated zig-sdl3 to 0.2.2 and restored optimized Windows builds with Zig 0.16.0.
  • Added native Linux, macOS, and Windows CI using Zig 0.16.0.

Breaking changes

  • Hooks.onExit now receives ExitContext and returns ExitStatus (completed or timed_out). Hooks remain synchronous and must cooperate with the supplied deadline.
  • The preferred configuration key is now exit_budget_ms. Existing exit_timeout_ms configurations remain supported as a compatibility fallback.
  • CLI parsing is intentionally stricter: informational options cannot be combined with execution options, and duplicate or unrecognized arguments are rejected.
  • Themes remain compile-time configuration only. The undocumented ZMENU_THEME environment-variable examples have been removed, and the documented default is Catppuccin Latte.

History and CLI

  • --hist-limit now accepts only 1..10000.
  • Its default comes directly from config.features.history_max_entries.
  • Feature integer flags support compile-time validated inclusive bounds.
  • Process environment access now uses Zig 0.16's portable Init.environ_map instead of unconditional POSIX APIs.

Validation

  • 71 unit tests pass with the default configuration and with history enabled.
  • Native ReleaseSafe build passes on Linux.
  • Cross-target x86_64-windows ReleaseSafe build passes.
  • The CI matrix runs build and tests natively on Linux, macOS, and Windows.