From c5e3814b84186fd850386d8638a4b097cf654003 Mon Sep 17 00:00:00 2001 From: xscriptor <“preciado.oscar.osorio@gmail.com”> Date: Sat, 15 Aug 2026 10:51:02 +0200 Subject: [PATCH] update animate-logo for support on macos add changelog --- plugins/animate-logo/CHANGELOG.md | 9 +++++++++ plugins/animate-logo/src/main.rs | 13 +++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 plugins/animate-logo/CHANGELOG.md diff --git a/plugins/animate-logo/CHANGELOG.md b/plugins/animate-logo/CHANGELOG.md new file mode 100644 index 0000000..7e1fe58 --- /dev/null +++ b/plugins/animate-logo/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +## 2026-08-15 — v0.1.0 + +### Full Frame Cycle for Frame-Style Animations + +- Fixed frame truncation in `frame` style: when `duration_ms` is not set in the logo animation config, the plugin no longer caps the output to the 1200 ms default (e.g. 14 frames at 12 fps), which caused the animation to be cut short and restart from the beginning. +- When `duration_ms` is absent and `style` is `frame` with source frames available, the plugin now emits every source frame exactly once (e.g. all 36 frames of a kitty animation), letting the host loop the complete animation. +- Behavior for generated styles (`sweep`, `wave`, `rainbow`, `sparkle`, `breathing`, `none`) and for explicit `duration_ms` values is unchanged. diff --git a/plugins/animate-logo/src/main.rs b/plugins/animate-logo/src/main.rs index d0e46ab..1d492fb 100644 --- a/plugins/animate-logo/src/main.rs +++ b/plugins/animate-logo/src/main.rs @@ -14,9 +14,18 @@ fn main() { let args = request.args; let fps = clamp(args.fps.unwrap_or(12), 1, 60); let frame_delay = 1000 / fps; - let duration_ms = std::cmp::max(frame_delay, args.duration_ms.unwrap_or(1200)); - let frame_count = std::cmp::max(1, duration_ms / frame_delay); let style = args.style.as_deref().unwrap_or("sweep"); + + let frame_count = if args.duration_ms.is_none() + && style == "frame" + && request.frames.as_ref().is_some_and(|sets| !sets.is_empty()) + { + request.frames.as_ref().unwrap().len() as u64 + } else { + let duration_ms = std::cmp::max(frame_delay, args.duration_ms.unwrap_or(1200)); + std::cmp::max(1, duration_ms / frame_delay) + }; + let frame_sets = request.frames.unwrap_or_default(); let frames: Vec = match style {