aboutsummaryrefslogtreecommitdiff
path: root/niri-config
diff options
context:
space:
mode:
Diffstat (limited to 'niri-config')
-rw-r--r--niri-config/src/lib.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index e7de610c..1de7b159 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -1090,6 +1090,17 @@ pub struct FoIPosition {
pub x: FloatOrInt<-65535, 65535>,
#[knuffel(property)]
pub y: FloatOrInt<-65535, 65535>,
+ #[knuffel(property, default)]
+ pub relative_to: RelativeTo,
+}
+
+#[derive(knuffel::DecodeScalar, Debug, Default, Clone, Copy, PartialEq, Eq)]
+pub enum RelativeTo {
+ #[default]
+ TopLeft,
+ TopRight,
+ BottomLeft,
+ BottomRight,
}
#[derive(Debug, Default, PartialEq)]
@@ -3214,7 +3225,7 @@ mod tests {
open-floating false
open-focused true
default-window-height { fixed 500; }
- default-floating-position x=100 y=-200
+ default-floating-position x=100 y=-200 relative-to="bottom-left"
focus-ring {
off
@@ -3502,6 +3513,7 @@ mod tests {
default_floating_position: Some(FoIPosition {
x: FloatOrInt(100.),
y: FloatOrInt(-200.),
+ relative_to: RelativeTo::BottomLeft,
}),
focus_ring: BorderRule {
off: true,