diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index d2331739..2d2e4723 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -119,6 +119,9 @@ pub struct BorderColours { /// Border colour when the container is unfocused #[serde(skip_serializing_if = "Option::is_none")] pub unfocused: Option, + /// Border colour when the container is unfocused and locked + #[serde(skip_serializing_if = "Option::is_none")] + pub unfocused_locked: Option, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] @@ -700,6 +703,9 @@ impl From<&WindowManager> for StaticConfig { unfocused: Option::from(Colour::from( border_manager::UNFOCUSED.load(Ordering::SeqCst), )), + unfocused_locked: Option::from(Colour::from( + border_manager::UNFOCUSED_LOCKED.load(Ordering::SeqCst), + )), }) }; @@ -881,6 +887,11 @@ impl StaticConfig { if let Some(unfocused) = colours.unfocused { border_manager::UNFOCUSED.store(u32::from(unfocused), Ordering::SeqCst); } + + if let Some(unfocused_locked) = colours.unfocused_locked { + border_manager::UNFOCUSED_LOCKED + .store(u32::from(unfocused_locked), Ordering::SeqCst); + } } STYLE.store(self.border_style.unwrap_or_default()); diff --git a/komorebi/src/window_manager.rs b/komorebi/src/window_manager.rs index 678fa62e..629ffecd 100644 --- a/komorebi/src/window_manager.rs +++ b/komorebi/src/window_manager.rs @@ -248,6 +248,9 @@ impl Default for GlobalState { unfocused: Option::from(Colour::Rgb(Rgb::from( border_manager::UNFOCUSED.load(Ordering::SeqCst), ))), + unfocused_locked: Option::from(Colour::Rgb(Rgb::from( + border_manager::UNFOCUSED_LOCKED.load(Ordering::SeqCst), + ))), }, border_style: STYLE.load(), border_offset: border_manager::BORDER_OFFSET.load(Ordering::SeqCst),