diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-08-20 14:31:34 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-08-20 14:43:50 +0300 |
| commit | e81f356908fe38ec45c74cf822dd102efbcf6457 (patch) | |
| tree | 5c5263b210a0755f48b1511cc1ff8c2697e095a6 /src/ui | |
| parent | 1013147ba3154788cb16ffc32b8155fd2008dfa3 (diff) | |
| download | niri-e81f356908fe38ec45c74cf822dd102efbcf6457.tar.gz niri-e81f356908fe38ec45c74cf822dd102efbcf6457.tar.bz2 niri-e81f356908fe38ec45c74cf822dd102efbcf6457.zip | |
Add spawn-sh, spawn-at-startup-sh
Our top 10 most confusing config moments
Diffstat (limited to 'src/ui')
| -rw-r--r-- | src/ui/hotkey_overlay.rs | 7 |
1 files changed, 6 insertions, 1 deletions
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 <span face='monospace' bgcolor='#000000'>{}</span>", args.first().unwrap_or(&String::new()) ), + Action::SpawnSh(command) => format!( + "Spawn <span face='monospace' bgcolor='#000000'>{}</span>", + // Fairly crude but should get the job done in most cases. + command.split_ascii_whitespace().next().unwrap_or("") + ), _ => String::from("FIXME: Unknown"), } } |
