Skip to content

feat(themes): add Minecraft (Claude) taskbar theme - #215

Open
Amineharrabi wants to merge 1 commit into
CodeZeno:mainfrom
Amineharrabi:feat/minecraft-claude-theme
Open

Amineharrabi wants to merge 1 commit into
CodeZeno:mainfrom
Amineharrabi:feat/minecraft-claude-theme

Conversation

@Amineharrabi

Copy link
Copy Markdown

Summary

  • Adds an editable bundled Minecraft (Claude) taskbar theme, alongside the existing Codex Minecraft theme: hearts show the Claude weekly limit left, and a hunger bar below shows the session (5-hour) limit left. Both reset countdowns sit to the right (weekly on top, session below).
  • Each bar is ten icons in half-icon (5%) steps. Both drain from the right, and the last half icon only disappears at 100% used. Each bar works like the Codex theme: a full strip clipped over an empty strip. The clip width is halves * 7 + 2, and only claude.{weekly,session}.percentage are used.
  • Sprites are 9×9 with an 8-column stride (outlines overlap, as in the game). They're drawn 16px tall (142×16 strips) using a symmetric 1–2px column pattern, so they stay crisp at 100% scaling and every icon is identical. The hearts use the Codex theme's heart texture, with a transparent fill for empty hearts. The widget is 196×44, small enough to dock in a crowded taskbar.
  • Reset text uses system.dark to switch between light and dark text.
  • Install marker fix: bundled editable themes shared a single .minecraft-theme-installed marker, so a bundled theme added in a later release would never reach existing installs. Each entry in BUNDLED_EDITABLE_THEME_SOURCES now has its own marker (.minecraft-claude-theme-installed for this one). A bundled theme the user deleted still stays deleted, and existing installs keep their current Codex theme state.

Testing

  • Manual: I copied the theme JSON and assets into %APPDATA%\ClaudeCodeUsageMonitor\themes of an installed v2.23.0 on Windows 11 (100% scaling) and selected it in Settings → Appearance → Active theme. It docks next to the tray, and the bars match live usage (33% weekly → 7 hearts, 19% session → 8½ drumsticks).
  • Added tests:
    • bundled_minecraft_claude_bars_snap_to_half_icons checks clip widths at several usage levels, using different weekly and session values so a swap between the bars would fail.
    • bundled_minecraft_claude_theme_reaches_existing_installs checks the per-theme marker behaviour.
  • Updated test: the bundled-theme validity test now covers both themes and checks that each asset is used exactly once.
  • Not run: cargo fmt --check, cargo test and cargo build. I don't have the Rust/MSVC toolchain on this machine, so the Rust changes haven't been compiled. Please run CI or the checks locally before merging.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md.
  • The change is focused and contains no credentials or sensitive data.
  • I have added or updated relevant documentation and tests, where applicable.
  • I have left changelog and version changes to maintainers unless requested.

🤖 Generated with Claude Code

Add an editable bundled theme for Claude, alongside the Codex Minecraft
theme: hearts show the weekly limit left and a hunger bar below shows the
session (5-hour) limit left, with both reset countdowns beside them.

- Both bars are ten icons that move in half-icon (5%) steps and drain from
  the right. The last half icon only disappears at 100% used.
- Sprites are 9x9 with an 8-column stride, drawn 16px tall (142x16 strips)
  using a symmetric 1-2px column pattern, so they stay crisp at 100%
  scaling and every icon is identical. The widget is 196x44.
- Empty hearts are outlines with a transparent fill.
- Reset text switches between light and dark with system.dark.

Bundled editable themes previously shared one install marker, so a theme
added in a later release never reached existing installs. Each bundled
theme now has its own marker; a deleted bundled theme stays deleted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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