aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-11-18 13:16:51 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-11-18 13:18:30 +0300
commitc256842761b8b7eba7c8663cd1b02fcf3ab75ea0 (patch)
treecb7b40754b50af654554c5d0c69ee8f5e3ebca16
parent7f19d268b3563e3683eaca02d9665fed66ce862e (diff)
downloadniri-c256842761b8b7eba7c8663cd1b02fcf3ab75ea0.tar.gz
niri-c256842761b8b7eba7c8663cd1b02fcf3ab75ea0.tar.bz2
niri-c256842761b8b7eba7c8663cd1b02fcf3ab75ea0.zip
Change recent-windows binds to have lower precedence
Otherwise it breaks people's existing binds.
-rw-r--r--docs/wiki/Configuration:-Recent-Windows.md3
-rw-r--r--src/input/mod.rs4
2 files changed, 4 insertions, 3 deletions
diff --git a/docs/wiki/Configuration:-Recent-Windows.md b/docs/wiki/Configuration:-Recent-Windows.md
index 07b166b0..6d819d59 100644
--- a/docs/wiki/Configuration:-Recent-Windows.md
+++ b/docs/wiki/Configuration:-Recent-Windows.md
@@ -138,7 +138,8 @@ recent-windows {
}
```
-The recent windows binds have a precedence over the [normal binds](./Configuration:-Key-Bindings.md), meaning that if you have <kbd>Alt</kbd><kbd>Tab</kbd> bound to something else in the normal binds, the `recent-windows` bind will override it.
+The recent windows binds have lower precedence than the [normal binds](./Configuration:-Key-Bindings.md), meaning that if you have <kbd>Alt</kbd><kbd>Tab</kbd> bound to something else in the normal binds, the `recent-windows` bind won't work.
+In this case, you can remove the conflicting normal bind.
All binds in this section must have a modifier key like <kbd>Alt</kbd> or <kbd>Mod</kbd> because the recent windows switcher remains open only while you hold any modifier key.
diff --git a/src/input/mod.rs b/src/input/mod.rs
index a952a23a..e8a4c5ee 100644
--- a/src/input/mod.rs
+++ b/src/input/mod.rs
@@ -4937,8 +4937,8 @@ fn make_binds_iter<'a>(
let mru_open_binds = mru.is_open().then(|| mru.opened_bindings(mods));
let mru_open_binds = mru_open_binds.into_iter().flatten();
- // MRU binds take precedence over general ones.
- mru_binds.chain(mru_open_binds).chain(general_binds)
+ // General binds take precedence over the MRU binds.
+ general_binds.chain(mru_binds).chain(mru_open_binds)
}
#[cfg(test)]