Skip to content

Comments

adding load configurable TOML themes from DATA_DIR/themes#29

Merged
CosmicPredator merged 15 commits intoCosmicPredator:mainfrom
aaravmaloo:main
Feb 22, 2026
Merged

adding load configurable TOML themes from DATA_DIR/themes#29
CosmicPredator merged 15 commits intoCosmicPredator:mainfrom
aaravmaloo:main

Conversation

@aaravmaloo
Copy link
Contributor

Description

This PR adds configurable themes using TOML files loaded from DATA_DIR/themes.

Summary of changes

  • Added theme loading from DATA_DIR/themes/*.toml.
  • Kept existing theme selection flow:
    • CHIBI_THEME override still works.
    • persisted DB theme still works when env var is not set.
  • Added validation for required theme keys in TOML files.
  • Added theme.ThemesPath() helper.
  • Updated chibi theme output to tell users they can add their own .toml theme and where to place it.
  • Added 5 example themes:
    • themes/default.toml
    • themes/nord.toml
    • themes/sunset.toml
    • themes/forest.toml
    • themes/graphite.toml
  • Updated README theme docs for TOML + DATA_DIR/themes.
  • Added tests for loading themes from data dir and filename-based theme naming.

Fixes #(issue) (If your PR is a 🐛 fix)

Type of change

Please delete options that are not relevant.

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📝 Documentation update

Tested Environments

  • Linux (any distro)
  • Windows (10 or 11)
  • MacOS ARM64
  • MacOS Intel

Checklist

  • I have used Gitmojis for my commit messages.
  • My code follows the style guidelines of the Go language.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (leave it unchecked if your changes doesn't need documentation update)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (Ignore this for now 🙂)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

N/A (CLI behavior and config loading changes).

Additional context

Validation run locally:

  • go test ./...

@CosmicPredator
Copy link
Owner

LGTM!!!

@CosmicPredator CosmicPredator merged commit f585d76 into CosmicPredator:main Feb 22, 2026
1 check passed
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.

2 participants