Files
owlen/examples/custom_theme.rs
vikingowl 5b202fed4f Add comprehensive documentation and examples for Owlen architecture and usage
- Include detailed architecture overview in `docs/architecture.md`.
- Add `docs/configuration.md`, detailing configuration file structure and settings.
- Provide a step-by-step provider implementation guide in `docs/provider-implementation.md`.
- Add frequently asked questions (FAQ) document in `docs/faq.md`.
- Create `docs/migration-guide.md` for future breaking changes and version upgrades.
- Introduce new examples in `examples/` showcasing basic chat, custom providers, and theming.
- Add a changelog (`CHANGELOG.md`) for tracking significant changes.
- Provide contribution guidelines (`CONTRIBUTING.md`) and a Code of Conduct (`CODE_OF_CONDUCT.md`).
2025-10-05 02:23:32 +02:00

29 lines
977 B
Rust

// This example demonstrates how to create a custom theme programmatically.
use owlen_core::theme::Theme;
use ratatui::style::{Color, Style};
fn create_custom_theme() -> Theme {
Theme {
name: "My Custom Theme".to_string(),
author: "Your Name".to_string(),
comment: "A simple custom theme".to_string(),
base: Style::default().fg(Color::White).bg(Color::Black),
user_chat: Style::default().fg(Color::Green),
bot_chat: Style::default().fg(Color::Cyan),
error: Style::default().fg(Color::Red),
info: Style::default().fg(Color::Yellow),
border: Style::default().fg(Color::Gray),
input: Style::default().fg(Color::White),
..Default::default()
}
}
fn main() {
let custom_theme = create_custom_theme();
println!("Created custom theme: {}", custom_theme.name);
println!("Author: {}", custom_theme.author);
println!("User chat color: {:?}", custom_theme.user_chat.fg);
}