Skip to content

Tray icon: animated flame reflecting live burn rate #51

Description

@tangentlin

Motivation

Burnbar's tray icon is currently static. Since the app is literally named for "burning" tokens, the menu-bar icon is the one surface visible without opening anything — animating it ambiently would make the app's identity felt at a glance, not just readable in a menu.

Proposal

Pre-render a small set of flame frames (ember glow → roaring fire) and cycle them via tray.setImage() on a short interval (~1-2s), modulated by burn rate (tokens/min or $/hr over a short recent window) rather than absolute spend:

  • Idle / no recent activity → gentle ember glow, barely animated (battery-friendly).
  • Active heavy session → faster flicker / taller flame.

Feasibility notes

  • TrayManager already swaps NativeImages (refreshIcon, dashboardIcon, the transparent spacer) — swapping the main tray icon on an interval is the same primitive, just applied to Tray.setImage().
  • Needs a new lightweight burn rate derivation (short rolling window) distinct from today's cumulative totals — likely a small addition near capture-service.ts/derive.ts, not the existing daily/30d figures.
  • Must stay cheap: template images are small (~22pt), and the interval should back off to a slow/static frame when burn rate is ~0 to avoid needless CPU/battery use.

Acceptance criteria

  • A handful of flame frames render as monochrome template images (matches existing icon behavior, tints correctly in light/dark menu bars).
  • Animation speed/intensity is driven by a short-window burn-rate metric, not cumulative cost.
  • Idle state settles into a low-frequency (or static) frame — no continuous redraw when there's nothing to show.
  • No measurable added CPU/battery burden when idle.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions