aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-29 20:44:34 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-29 20:44:34 +0300
commit101de0ce453615c809d95175532bcb86f816163a (patch)
tree1722c86a0d553b72bff1de08289564ad39ce5fa4 /src/main.rs
parentbf6b6d779a63d8952d8db0a7de5daa3454984620 (diff)
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)
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs16
1 files changed, 14 insertions, 2 deletions
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())