aboutsummaryrefslogtreecommitdiff
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/model.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/config/model.rs b/src/config/model.rs
index 8d2b356f..ffc117ed 100644
--- a/src/config/model.rs
+++ b/src/config/model.rs
@@ -149,6 +149,8 @@ pub struct UiConfig {
pub struct AdvancedConfig {
/// Allow launching herdr inside an existing herdr pane. Default: false.
pub allow_nested: bool,
+ /// Experimental local Kitty graphics rendering for attached clients. Default: false.
+ pub kitty_graphics: bool,
/// Maximum scrollback buffer size in bytes retained per pane terminal. Default: 10000000.
#[serde(alias = "scrollback_lines")]
pub scrollback_limit_bytes: usize,
@@ -237,6 +239,7 @@ impl Default for AdvancedConfig {
fn default() -> Self {
Self {
allow_nested: false,
+ kitty_graphics: false,
scrollback_limit_bytes: DEFAULT_SCROLLBACK_LIMIT_BYTES,
}
}
@@ -332,14 +335,29 @@ delivery = "terminal"
}
#[test]
+ fn kitty_graphics_default_off_and_parse() {
+ let config = Config::default();
+ assert!(!config.advanced.kitty_graphics);
+
+ let toml = r#"
+[advanced]
+kitty_graphics = true
+"#;
+ let config: Config = toml::from_str(toml).unwrap();
+ assert!(config.advanced.kitty_graphics);
+ }
+
+ #[test]
fn advanced_config_parses() {
let toml = r#"
[advanced]
allow_nested = true
+kitty_graphics = true
scrollback_limit_bytes = 12345
"#;
let config: Config = toml::from_str(toml).unwrap();
assert!(config.advanced.allow_nested);
+ assert!(config.advanced.kitty_graphics);
assert_eq!(config.advanced.scrollback_limit_bytes, 12345);
}