From ca4ee5ae25c1ad3b50a0d74038eea652f427c3e9 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 10 Feb 2024 14:37:38 +0400 Subject: hotkey-overlay: Only show Spawn binds with Mod/Super --- src/hotkey_overlay.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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()); } -- cgit