Greg's calculator - a terminal UI calculator inspired by galculator (GTK), implemented in Go with Bubble Tea. Features decimal math, base display cycling (DEC/HEX/BIN/OCT) with CERR on non-integers, tactile keypad, wide integrated display.
- internal/ui/ui.go: full Bubble Tea App - Large tall LCD-style number area + small current-base row (only the active label highlighted) - CERR flash (~600ms color 63) on BASE when value is non-integer (exact policy from spec) - 140ms key action flashes (same style as gostations volume/skip/stop) - Minimal usable keypad grid (digits, + - * / = . +/- MOD C AC, prominent BASE button) - Tab (and button) drives engine.CycleBase() - Content-sized centered card (lipgloss.Place + rounded 63 border), subtle 238 inners - Minimal non-wrapping hint row - Reuses gostations lipgloss idioms (Join*, Width/Align/Center, flashStyle, NormalBorder, etc.) - main.go: now actually launches tea.NewProgram (with AltScreen) - Binary: build/gralculator is runnable - Demonstrates: enter 23/6 = (or 1/3), press Tab → CERR blink, base stays DEC; integer values cycle cleanly and reformat (HEX etc.) All three phases complete. Architecture + design notes live in docs/. Full commit history for backtracking. |
||
|---|---|---|
| docs | ||
| internal | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| spec.md | ||