aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--src/niri.rs9
2 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4dd9f294..a2534d8f 100644
--- a/README.md
+++ b/README.md
@@ -165,7 +165,7 @@ Please use the default configuration file as the starting point for your custom
Niri will live-reload many of the configuration settings, like key binds or gaps, as you change the config file.
Though, some settings are still missing live-reload support.
-Notably, output modes and positions will only apply when the output is reconnected.
+Notably, output modes will only apply when the output is reconnected.
[PaperWM]: https://github.com/paperwm/PaperWM
[mako]: https://github.com/emersion/mako
diff --git a/src/niri.rs b/src/niri.rs
index 870da89e..69578804 100644
--- a/src/niri.rs
+++ b/src/niri.rs
@@ -542,6 +542,7 @@ impl State {
animation::ANIMATION_SLOWDOWN.store(config.debug.animation_slowdown, Ordering::Relaxed);
let mut reload_xkb = None;
+ let mut output_config_changed = false;
let mut old_config = self.niri.config.borrow_mut();
// Reload the cursor.
@@ -568,6 +569,10 @@ impl State {
);
}
+ if config.outputs != old_config.outputs {
+ output_config_changed = true;
+ }
+
*old_config = config;
// Release the borrow.
@@ -581,6 +586,10 @@ impl State {
}
}
+ if output_config_changed {
+ self.niri.reposition_outputs(None);
+ }
+
self.niri.queue_redraw_all();
// FIXME: apply output scale and whatnot.
// FIXME: apply libinput device settings.