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:
parent
9b0bac12ff
commit
4c0117724e
3 changed files with 26 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue