Add per-output layout config

This commit is contained in:
Ivan Molodetskikh
2025-09-25 18:15:46 +03:00
parent a5e285865b
commit 09cf8402c3
7 changed files with 134 additions and 18 deletions
+1
View File
@@ -791,6 +791,7 @@ mod tests {
bottom_right: true,
},
),
layout: None,
},
],
),
+5 -1
View File
@@ -1,7 +1,7 @@
use niri_ipc::{ConfiguredMode, Transform};
use crate::gestures::HotCorners;
use crate::{Color, FloatOrInt};
use crate::{Color, FloatOrInt, LayoutPart};
#[derive(Debug, Default, Clone, PartialEq)]
pub struct Outputs(pub Vec<Output>);
@@ -24,12 +24,15 @@ pub struct Output {
pub variable_refresh_rate: Option<Vrr>,
#[knuffel(child)]
pub focus_at_startup: bool,
// Deprecated; use layout.background_color.
#[knuffel(child)]
pub background_color: Option<Color>,
#[knuffel(child)]
pub backdrop_color: Option<Color>,
#[knuffel(child)]
pub hot_corners: Option<HotCorners>,
#[knuffel(child)]
pub layout: Option<LayoutPart>,
}
impl Output {
@@ -60,6 +63,7 @@ impl Default for Output {
background_color: None,
backdrop_color: None,
hot_corners: None,
layout: None,
}
}
}