Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
run: cargo test --workspace

- name: Build tca-ratatui loader feature
run: cargo test -p tca-ratatui --features loader
run: cargo test -p tca-ratatui --features fs

- name: Build picker example
run: cargo build --example picker -p tca-ratatui --features "loader widgets"
run: cargo build --example picker -p tca-ratatui --features "fs widgets"

clippy:
name: Clippy
Expand Down
20 changes: 19 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.4.0]

### Added

- `ThemeCursor<T>` generic cycling cursor in `tca-types`. Comes with `with_builtins()`, `with_user_themes()`, `with_all_themes()`, and `new(vec)` constructors on `ThemeCursor<Theme>`.
- `TcaThemeCursor` newtype in `tca-ratatui` wrapping `ThemeCursor<TcaTheme>`. Full navigation API with its own `with_builtins()`, `with_user_themes()`, `with_all_themes()`, and `new(vec)` constructors.
- `BuiltinTheme::iter()` convenience wrapper that hides the `strum` dependency from callers.

### Changed

- `tca` crate renamed to `tca-cli` on crates.io (binary name `tca` is unchanged).
- `tca-ratatui`: feature flag corrected from `loader` to `fs` (aligns with `tca-types`).
- `tca-ratatui`: `toml` and `terminal-colorsaurus` are now optional dependencies, only pulled in under the `fs` feature.

## [0.3.0]

### Added
Expand Down Expand Up @@ -34,6 +50,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

### Initial Release

[Unreleased]: https://github.com/carmiac/tca-rust/commits/main
[Unreleased]: https://github.com/carmiac/tca-rust/compare/v0.4.0...HEAD
[0.4.0]: https://github.com/carmiac/tca-rust/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/carmiac/tca-rust/compare/v0.2.0...v0.3.0
[0.2.0]: https://github.com/carmiac/tca-rust/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/carmiac/tca-rust/releases/tag/v0.1.0
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[workspace]
resolver = "2"
members = ["tca-types", "tca-loader", "tca", "tca-ratatui"]
members = ["tca-types", "tca-cli", "tca-ratatui"]

[workspace.package]
version = "0.3.0"
version = "0.4.0"
edition = "2021"
license = "MIT"
authors = ["carmiac"]
Expand All @@ -12,8 +12,7 @@ homepage = "https://github.com/carmiac/tca-rust"

[workspace.dependencies]
# Internal dependencies
tca-types = { path = "./tca-types", version = "0.3.0" }
tca-loader = { path = "./tca-loader", version = "0.3.0" }
tca-types = { path = "./tca-types", version = "0.4.0" }

# External dependencies
thiserror = "2.0"
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Browse available themes at [tca-themes](https://github.com/carmiac/tca-themes).

`TcaTheme::new(Some("name"))` tries each step in order, falling back gracefully:

1. **User theme files** - searches `~/.local/share/tca-themes/<name>.toml`, or accepts an exact file path
2. **Built-in themes** - catppuccin-mocha, cyberpunk, dracula, everforest-dark, gruvbox-dark, mono, nord, one-dark, rose-pine, solarized-light, tokyo-night
3. **User preference** - reads `~/.config/tca/tca.toml` for a configured default
4. **Auto-detect** - picks a dark or light built-in based on the terminal's background color
1. User theme files - searches `~/.local/share/tca-themes/<name>.toml`, or accepts an exact file path
1. Built-in themes - catppuccin-mocha, cyberpunk, dracula, everforest-dark, gruvbox-dark, mono, nord, one-dark, rose-pine, solarized-light, tokyo-night
1. User preference - reads `~/.config/tca/tca.toml` for a configured default
1. Auto-detect - picks a dark or light built-in based on the terminal's background color

Passing `None` skips steps 1-2 and goes straight to the user's preference or auto-detection.

Expand All @@ -52,15 +52,14 @@ Passing `None` skips steps 1-2 and goes straight to the user's preference or aut
| Crate | Purpose |
| ------------------------------- | ----------------------------------------- |
| **[tca-ratatui](tca-ratatui/)** | Ratatui integration - `TcaTheme`, widgets |
| **[tca-loader](tca-loader/)** | XDG theme file discovery and loading |
| **[tca-types](tca-types/)** | Core TOML types and color resolution |
| **[tca](tca/)** | CLI — `validate`, `export`, `list` |
| **[tca-cli](tca-cli/)** | CLI — `validate`, `export`, `list` |

## Getting Started

```toml
[dependencies]
tca-ratatui = "0.2"
tca-ratatui = "0.4"
```

```rust
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion tca/Cargo.toml → tca-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ path = "src/main.rs"

[dependencies]
tca-types = { workspace = true }
tca-loader = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
jsonschema = { workspace = true }
Expand Down
7 changes: 4 additions & 3 deletions tca/README.md → tca-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tca
# Tca-Cli

CLI tool for validating and exporting [TCA](https://github.com/carmiac/tca-rust) theme files.

Expand All @@ -13,7 +13,7 @@ Or from source:
```sh
git clone https://github.com/carmiac/tca-rust
cd tca-rust
cargo install --path tca
cargo install --path tca-cli
```

## Commands
Expand Down Expand Up @@ -59,7 +59,7 @@ Lists all installed themes.
tca list
```

## Theme directory
## Theme Directory

Themes are `.toml` files in `~/.local/share/tca-themes/` (or `$XDG_DATA_HOME/tca-themes/`).

Expand All @@ -68,6 +68,7 @@ Themes are `.toml` files in `~/.local/share/tca-themes/` (or `$XDG_DATA_HOME/tca
- Init command to create default config and add default theme files
- Download and install themes
- Import base16/24 themes into TCA format
- Export to base24

## License

Expand Down
Loading
Loading