From e81f356908fe38ec45c74cf822dd102efbcf6457 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 20 Aug 2025 14:31:34 +0300 Subject: Add spawn-sh, spawn-at-startup-sh Our top 10 most confusing config moments --- src/ui/hotkey_overlay.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/ui') diff --git a/src/ui/hotkey_overlay.rs b/src/ui/hotkey_overlay.rs index 7042d2c0..d30d500d 100644 --- a/src/ui/hotkey_overlay.rs +++ b/src/ui/hotkey_overlay.rs @@ -270,7 +270,7 @@ fn render( // Add the spawn actions. for bind in binds.iter().filter(|bind| { - matches!(bind.action, Action::Spawn(_)) + matches!(bind.action, Action::Spawn(_) | Action::SpawnSh(_)) // 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)) @@ -447,6 +447,11 @@ fn action_name(action: &Action) -> String { "Spawn {}", args.first().unwrap_or(&String::new()) ), + Action::SpawnSh(command) => format!( + "Spawn {}", + // Fairly crude but should get the job done in most cases. + command.split_ascii_whitespace().next().unwrap_or("") + ), _ => String::from("FIXME: Unknown"), } } -- cgit