diff options
Diffstat (limited to 'niri-config/src')
| -rw-r--r-- | niri-config/src/lib.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs index 26689d09..87e2c4a6 100644 --- a/niri-config/src/lib.rs +++ b/niri-config/src/lib.rs @@ -412,6 +412,19 @@ impl From<Border> for FocusRing { } } +impl From<FocusRing> for Border { + fn from(value: FocusRing) -> Self { + Self { + off: value.off, + width: value.width, + active_color: value.active_color, + inactive_color: value.inactive_color, + active_gradient: value.active_gradient, + inactive_gradient: value.inactive_gradient, + } + } +} + #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] pub struct Color { pub r: u8, @@ -702,6 +715,8 @@ pub struct WindowRule { pub max_height: Option<u16>, #[knuffel(child, default)] + pub focus_ring: BorderRule, + #[knuffel(child, default)] pub border: BorderRule, #[knuffel(child, unwrap(argument))] pub draw_border_with_background: Option<bool>, @@ -2048,6 +2063,11 @@ mod tests { open-maximized true open-fullscreen false + focus-ring { + off + width 3 + } + border { on width 8 @@ -2254,6 +2274,11 @@ mod tests { open_on_output: Some("eDP-1".to_owned()), open_maximized: Some(true), open_fullscreen: Some(false), + focus_ring: BorderRule { + off: true, + width: Some(3), + ..Default::default() + }, border: BorderRule { on: true, width: Some(8), |
