aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index c1195a24..88092955 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -18,6 +18,7 @@ pub struct Config {
pub onboarding: Option<bool>,
pub keys: KeysConfig,
pub ui: UiConfig,
+ pub advanced: AdvancedConfig,
}
#[derive(Debug)]
@@ -66,6 +67,13 @@ pub struct UiConfig {
pub sound: SoundConfig,
}
+#[derive(Debug, Default, Deserialize)]
+#[serde(default)]
+pub struct AdvancedConfig {
+ /// Allow launching herdr inside an existing herdr pane. Default: false.
+ pub allow_nested: bool,
+}
+
#[derive(Debug, Clone, Deserialize)]
#[serde(default)]
pub struct SoundConfig {
@@ -921,4 +929,14 @@ claude = "on"
assert_eq!(config.ui.sound.agents.claude, AgentSoundSetting::On);
assert_eq!(config.ui.sound.agents.pi, AgentSoundSetting::Default);
}
+
+ #[test]
+ fn advanced_allow_nested_parses() {
+ let toml = r#"
+[advanced]
+allow_nested = true
+"#;
+ let config: Config = toml::from_str(toml).unwrap();
+ assert!(config.advanced.allow_nested);
+ }
}