diff --git a/config/src/lib.rs b/config/src/lib.rs index a26f0c847..b9aa30b3d 100644 --- a/config/src/lib.rs +++ b/config/src/lib.rs @@ -745,8 +745,8 @@ pub struct Config { /// A subtle dimming effect can be achieved by setting: /// inactive_pane_saturation = 0.9 /// inactive_pane_brightness = 0.8 - #[serde(default)] - pub inactive_pane_hsb: Option, + #[serde(default = "default_inactive_pane_hsb")] + pub inactive_pane_hsb: HsbTransform, #[serde(default = "default_one_point_oh")] pub text_background_opacity: f32, @@ -829,6 +829,14 @@ fn default_update_interval() -> u64 { 86400 } +fn default_inactive_pane_hsb() -> HsbTransform { + HsbTransform { + brightness: 0.8, + saturation: 0.9, + hue: 1.0, + } +} + #[derive(Deserialize, Serialize, Clone, Copy, Debug)] pub enum DefaultCursorStyle { BlinkingBlock, diff --git a/wezterm-gui/src/gui/termwindow.rs b/wezterm-gui/src/gui/termwindow.rs index f3c2a45ea..107016b35 100644 --- a/wezterm-gui/src/gui/termwindow.rs +++ b/wezterm-gui/src/gui/termwindow.rs @@ -2674,7 +2674,7 @@ impl TermWindow { let hsv = if params.is_active { None } else { - params.config.inactive_pane_hsb + Some(params.config.inactive_pane_hsb) }; let window_is_transparent =