diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-24 22:17:53 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-04-24 22:17:53 +0400 |
| commit | fd6c8c7790ae4e7dca1f242263f41411a1bab96e (patch) | |
| tree | b53b04dbef2e934d2b9fc25346fbfcb1c524714c /niri-config/src | |
| parent | 3e598c565e6e8ad4c34e93aec9a49e60d51d730e (diff) | |
| download | niri-fd6c8c7790ae4e7dca1f242263f41411a1bab96e.tar.gz niri-fd6c8c7790ae4e7dca1f242263f41411a1bab96e.tar.bz2 niri-fd6c8c7790ae4e7dca1f242263f41411a1bab96e.zip | |
Implement focus-ring window rule
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), |
