Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
feat: keep optional command= on media-key input.kdl bindings
The new volume/brightness actions (cce-window-manager) have stock
commands; an input.kdl entry's command= property now rides along to
override them, with the usual PATH-existence warning.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/server/config.rs | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/src/server/config.rs b/src/server/config.rs
index e8f3d91..dd9423d 100644
--- a/src/server/config.rs
+++ b/src/server/config.rs
@@ -1971,11 +1971,19 @@ pub fn parse_config(path: &str, state: &mut crate::window_manager::WindowManager
eprintln!("[WARNING] input.kdl: unknown window-manager action {:?}", entry.name);
continue;
};
- let command = if action == Action::Spawn || action == Action::Toggle {
- warn_if_command_missing(entry.command.as_deref());
- entry.command.clone()
- } else {
- None
+ let command = match action {
+ Action::Spawn | Action::Toggle => {
+ warn_if_command_missing(entry.command.as_deref());
+ entry.command.clone()
+ }
+ // Media-key actions have stock commands (policy-side
+ // `media_command`); a `command=` property overrides.
+ Action::VolumeUp | Action::VolumeDown | Action::VolumeMute | Action::MicMute
+ | Action::BrightnessUp | Action::BrightnessDown => {
+ warn_if_command_missing(entry.command.as_deref());
+ entry.command.clone()
+ }
+ _ => None,
};
let keysym = parse_keysym(&chord.key);
if keysym == 0 {