aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--niri-config/src/lib.rs3
-rw-r--r--src/ui/hotkey_overlay.rs5
-rw-r--r--wiki/Configuration:-Miscellaneous.md13
3 files changed, 21 insertions, 0 deletions
diff --git a/niri-config/src/lib.rs b/niri-config/src/lib.rs
index 012db9e9..83689a4b 100644
--- a/niri-config/src/lib.rs
+++ b/niri-config/src/lib.rs
@@ -1031,6 +1031,8 @@ pub struct Struts {
pub struct HotkeyOverlay {
#[knuffel(child)]
pub skip_at_startup: bool,
+ #[knuffel(child)]
+ pub hide_not_bound: bool,
}
#[derive(knuffel::Decode, Debug, Default, Clone, Copy, PartialEq, Eq)]
@@ -4610,6 +4612,7 @@ mod tests {
},
hotkey_overlay: HotkeyOverlay {
skip_at_startup: true,
+ hide_not_bound: false,
},
animations: Animations {
off: false,
diff --git a/src/ui/hotkey_overlay.rs b/src/ui/hotkey_overlay.rs
index 1430a9d6..7042d2c0 100644
--- a/src/ui/hotkey_overlay.rs
+++ b/src/ui/hotkey_overlay.rs
@@ -285,6 +285,11 @@ fn render(
}
}
+ if config.hotkey_overlay.hide_not_bound {
+ // Only keep actions that have been bound
+ actions.retain(|&action| binds.iter().any(|bind| bind.action == *action))
+ }
+
let strings = actions
.into_iter()
.filter_map(|action| format_bind(binds, mod_key, action))
diff --git a/wiki/Configuration:-Miscellaneous.md b/wiki/Configuration:-Miscellaneous.md
index 1da2cb67..0fb26c41 100644
--- a/wiki/Configuration:-Miscellaneous.md
+++ b/wiki/Configuration:-Miscellaneous.md
@@ -225,6 +225,8 @@ clipboard {
Settings for the "Important Hotkeys" overlay.
+#### `skip-at-startup`
+
Set the `skip-at-startup` flag if you don't want to see the hotkey help at niri startup.
```kdl
@@ -233,4 +235,15 @@ hotkey-overlay {
}
```
+#### `hide-not-bound`
+
+By default, niri will show the most important actions even if they aren't bound to any key, to prevent confusion.
+Set the `hide-not-bound` flag if you want to hide all actions not bound to any key.
+
+```kdl
+hotkey-overlay {
+ hide-not-bound
+}
+```
+
You can customize which binds the hotkey overlay shows using the [`hotkey-overlay-title` property](./Configuration:-Key-Bindings.md#custom-hotkey-overlay-titles).