Make Config.keybinds into a hash map

This helps us with de-duplication. Previously, if you had host-specific
keybinds on the same key combination, the compositor would choose the
first... which is the opposite of how everything else in our config
handling works.
This commit is contained in:
Ben Buhse 2026-02-16 19:44:05 -06:00
commit 4c0117724e
No known key found for this signature in database
GPG key ID: 7916ACFCD38FD0B4
3 changed files with 26 additions and 11 deletions

View file

@ -105,10 +105,8 @@ fn manage_start(wm: *WindowManager) void {
}
}
// Rest of the keybinds
for (context.config.keybinds.items) |keybind| {
// Keysyms should only be null in tag_binds (above)
std.debug.assert(keybind.keysym != null);
context.xkb_bindings.addBinding(river_seat_v1, keybind.keysym.?, keybind.modifiers, keybind.command);
for (context.config.keybinds.keys(), context.config.keybinds.values()) |key, command| {
context.xkb_bindings.addBinding(river_seat_v1, key.keysym, key.modifiers, command);
}
// Pointer bindings