Skip to content

Personal: redesigned usage screen (live clock + 7-day history)#1

Merged
florianalber merged 1 commit into
add-waveshare-lcd-183from
personal-usage-redesign
Jun 17, 2026
Merged

Personal: redesigned usage screen (live clock + 7-day history)#1
florianalber merged 1 commit into
add-waveshare-lcd-183from
personal-usage-redesign

Conversation

@florianalber

Copy link
Copy Markdown
Owner

Personal customization layered on top of the LCD-1.83 board port (see HermannBjorgvin#77) — German labels + opinionated layout, kept on its own branch (deliberately not for upstream). Base is the board-port branch, so this PR shows just the personal UI/data layer.

What changed

  • Redesigned usage screen (ui.cpp, theme.h): header (logo + "Usage" wordmark + live clock), big SESSION % with a pace marker (elapsed share of the 5h window) and an "Über/Unter Tempo" verdict, a "LETZTE 7 TAGE" sparkline, a WEEKLY row (flex layout, equal gaps around the bar), and the status line. No battery icon — this SKU ships without a cell (has_battery=false).
  • Fonts: generated Tiempos 18 (wordmark), Mono 11 (small text) and Mono 15 (status) from assets/ via lv_font_conv, including the German glyphs (Ü / middot).
  • Live clock (data.h, main.cpp, daemon): daemon sends t as HH:MM:SS; the device anchors to the second and advances locally so the minute flips at the real boundary instead of lagging the 60 s poll.
  • 7-day history: daemon aggregates daily token totals from ~/.claude/projects/*.jsonl, normalizes to the busiest day, and sends them as d7; the firmware renders the sparkline (index 6 = today).

Testing

Built and flashed on the real ESP32-S3-Touch-LCD-1.83. Usage screen verified via framebuffer screenshots; clock confirmed accurate after the seconds-sync fix; daemon payload confirmed to carry t + d7 from real logs.

🤖 Generated with Claude Code

Personal customization on top of the LCD-1.83 board port (German labels,
opinionated layout — not intended for the upstream PR).

UI (ui.cpp, theme.h):
- Rebuilt the usage screen: header (logo + "Usage" wordmark + live clock),
  big SESSION % with a pace marker (elapsed share of the 5h window) and an
  "Ueber/Unter Tempo" verdict, a "LETZTE 7 TAGE" sparkline, a WEEKLY row
  (flex layout, equal gaps around the bar) and the status line.
- No battery icon: this SKU ships without a cell (has_battery=false in
  caps.cpp / board.h).

Fonts:
- Generated Tiempos 18 (wordmark), Mono 11 (small text) and Mono 15
  (status) from assets/ via lv_font_conv, incl. German glyphs (Ue/middot).

Data + protocol (data.h, main.cpp, daemon):
- UsageData gains clock[9] + day7[7]; parse_json reads "t" and "d7".
- Clock advances locally from a seconds-accurate host sync (HH:MM:SS) so it
  flips at the real minute boundary instead of lagging the 60s poll.
- Daemon sends "t" (HH:MM:SS) and "d7" (7-day token totals parsed from
  ~/.claude/projects/*.jsonl, normalized to the busiest day; index 6 = today).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@florianalber
florianalber merged commit 4e145bf into add-waveshare-lcd-183 Jun 17, 2026
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