diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-10 14:37:38 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-02-10 14:37:38 +0400 |
| commit | ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9 (patch) | |
| tree | aa0fa22bcb2a59dbf7ed8fda078160b018f48a07 | |
| parent | 93e16a6582f8e80ac4079ac527637861696ed7b1 (diff) | |
| download | niri-ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9.tar.gz niri-ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9.tar.bz2 niri-ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9.zip | |
hotkey-overlay: Only show Spawn binds with Mod/Super
| -rw-r--r-- | src/hotkey_overlay.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/hotkey_overlay.rs b/src/hotkey_overlay.rs index 81a61cdc..284ac0e4 100644 --- a/src/hotkey_overlay.rs +++ b/src/hotkey_overlay.rs @@ -216,10 +216,12 @@ fn render(config: &Config, comp_mod: CompositorMod, scale: i32) -> anyhow::Resul } // Add the spawn actions. - for bind in binds - .iter() - .filter(|bind| matches!(bind.actions.first(), Some(Action::Spawn(_)))) - { + for bind in binds.iter().filter(|bind| { + matches!(bind.actions.first(), Some(Action::Spawn(_))) + // Only show binds with Mod or Super to filter out stuff like volume up/down. + && (bind.key.modifiers.contains(Modifiers::COMPOSITOR) + || bind.key.modifiers.contains(Modifiers::SUPER)) + }) { actions.push(bind.actions.first().unwrap()); } |
