From 101de0ce453615c809d95175532bcb86f816163a Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Sun, 29 Mar 2026 20:44:34 +0300 Subject: refactor: two-section sidebar with agent detail panel, theme system with 9 built-in themes sidebar layout: - top section: workspace list with accent bar, git branch, state dots - bottom section: agent detail panel sorted by urgency with braille spinners - active workspace always highlighted (subtle bg in terminal mode, brighter in nav) - palette-driven colors throughout (no hardcoded colors in ui.rs) theme system: - 9 built-in themes: catppuccin (default), tokyo-night, dracula, nord, gruvbox, one-dark, solarized, kanagawa, rose-pine - config: theme.name selects base, theme.custom overrides individual tokens - 15 color tokens: accent, surface0/1, overlay0/1, text, subtext0, mauve, green, yellow, red, blue, teal, peach - legacy ui.accent still works for backward compatibility infrastructure: - Palette struct on AppState, ready for future theme system extensions - git_branch() reads .git/HEAD for branch detection - PaneDetail struct with urgency sorting for agent panel - spinner_tick counter for braille animation (~8fps on 60fps render loop) --- src/main.rs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 2341e09b..9d5d1b16 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,13 +73,25 @@ fn init_logging() { .init(); } -const DEFAULT_CONFIG: &str = r#"# herdr configuration +const DEFAULT_CONFIG: &str = r##"# herdr configuration # Place this file at ~/.config/herdr/config.toml # Show first-run notification setup on startup. # Missing also shows onboarding; set false after you've chosen. # onboarding = true +[theme] +# Built-in themes: catppuccin, tokyo-night, dracula, nord, gruvbox, +# one-dark, solarized, kanagawa, rose-pine +# name = "catppuccin" + +# Override individual color tokens on top of the base theme. +# Accepts: hex (#rrggbb), named colors, or rgb(r,g,b) +# [theme.custom] +# accent = "#f5c2e7" +# red = "#ff6188" +# green = "#a6e3a1" + [keys] # Prefix key to enter navigate mode (default: "ctrl+b") # Examples: "ctrl+b", "f12", "esc", "-" @@ -126,7 +138,7 @@ const DEFAULT_CONFIG: &str = r#"# herdr configuration [advanced] # Allow launching herdr from inside a herdr-managed pane. # allow_nested = false -"#; +"##; fn should_block_nested(config: &config::Config) -> bool { should_block_nested_for_env(config, std::env::var(HERDR_ENV_VAR).ok().as_deref()) -- cgit v1.2.3