feat(tui): themes, colour overrides and a ctrl+t theme picker #81

Merged
jwarykowski merged 2 commits from feat/themes into master 2026-10-25 05:41:26 +00:00
Owner

Summary

  • Themes: ansi (default, follows the terminal's 16 colours), catppuccin, dracula, gruvbox, nord and mono, each with light and dark palettes picked from the terminal background.
  • theme = "..." plus theme.<token> = "<colour>" overrides in config.toml (palette index, #hex, ANSI name or none).
  • theme row in settings, and a ctrl+t picker over the board: j/k preview live, enter keeps and saves, esc restores.
  • New internal/theme package shared by the TUI and shepherd stats.
  • Fix: board switches and the global toggle no longer drop the detected background and keyboard enhancements.
  • Fix: tests could write the user's real config through an inherited SHEPHERD_CONFIG (TestMouseSetting from #80). Every test package's TestMain now runs through internal/testenv, which sandboxes HOME and clears SHEPHERD_*, HERDR_* and XDG_CONFIG_HOME.

Testing

  • golangci-lint fmt, go vet, go test ./..., golangci-lint run clean.
  • Default theme renders byte-identical to master across 10 captured screens and coloured stats.
  • Checked nord plus an accent override, and the picker, in tmux.
## Summary - Themes: `ansi` (default, follows the terminal's 16 colours), `catppuccin`, `dracula`, `gruvbox`, `nord` and `mono`, each with light and dark palettes picked from the terminal background. - `theme = "..."` plus `theme.<token> = "<colour>"` overrides in `config.toml` (palette index, `#hex`, ANSI name or `none`). - `theme` row in settings, and a `ctrl+t` picker over the board: `j`/`k` preview live, `enter` keeps and saves, `esc` restores. - New `internal/theme` package shared by the TUI and `shepherd stats`. - Fix: board switches and the global toggle no longer drop the detected background and keyboard enhancements. - Fix: tests could write the user's real config through an inherited `SHEPHERD_CONFIG` (`TestMouseSetting` from #80). Every test package's `TestMain` now runs through `internal/testenv`, which sandboxes `HOME` and clears `SHEPHERD_*`, `HERDR_*` and `XDG_CONFIG_HOME`. ## Testing - `golangci-lint fmt`, `go vet`, `go test ./...`, `golangci-lint run` clean. - Default theme renders byte-identical to master across 10 captured screens and coloured `stats`. - Checked `nord` plus an accent override, and the picker, in tmux.
TestMouseSetting saved through an inherited SHEPHERD_CONFIG and rewrote
the user's real config. TestMain now runs through testenv.Run, which
points HOME at a temp dir and clears the redirect variables.
feat(tui): themes, config overrides and a ctrl+t theme picker
All checks were successful
pull-request / lint-and-test (pull_request) Successful in 1m16s
bcdabd60e7
Built-in themes (ansi, catppuccin, dracula, gruvbox, nord, mono) with
light and dark palettes, theme.<token> colour overrides in config.toml,
a settings row, and a ctrl+t picker that previews live. The board and
stats charts share the palette from internal/theme.
jwarykowski deleted branch feat/themes 2026-10-25 05:41:30 +00:00
Sign in to join this conversation.
No description provided.