Closed wabu closed 14 years ago
wabu@011e9f0b202a7c9c0c7c23a35c78908aba6f3fce changes the merge algorithm to be able to remove entries. the only problem now is you should not have empty entries in your config.yaml if you don't want to override anything.
with wabu@7cf2b9fe95ef6782efc5d6b62a7fa12c38ddc550 only entries with primitive values can be removed
In my opinion the Patch is useful anyway but perhaps the problem goes deeper.
Perhaps it is a good idea to split the complete keybinding into smaller chunks and only use a minimal subset as default. I really love this config and use it everyday but I only use a small subset of features/keybinding because very much is included per default. It's hard to memorize key combination's such as Mod1-Shift-z,t
My proposal for a layout:
control/ ├── action.yaml ├── keyboard │ ├── dvorak.yaml │ ├── neo2.yaml │ ├── qwerty │ │ ├── detach.yaml │ │ ├── grouping.yaml │ │ ├── launch.yaml │ │ └── ... │ └── qwerty.yaml ├── mouse.yaml └── workdir.yaml
What do you think about that?
Agreed, I prefer the approach of dividing the keybindings into smaller subsets too. That directory structure looks good, please proceed. And apologies for the eccentric keybindings (I use a Kinesis Advantage keyboard).
Ok, here comes my proposal: http://github.com/nougad/wmiirc/commit/e5bf21f85865d3217dcc3105f21e3ccdf6c2b087
Sorry for such a gigantic commit. But smaller chunks makes in this case no sense.
I only tested my qwerty keybinding.
What do you think about the include and generic folder? I think it's a little bit ugly to have two different folder but better than redundant code. An other Idea are symlinks from generic/* into qwerty/* for example.
I think we can use a single generic/
folder instead of the include/
. I'm currently building on your commit by splitting up the control/action
partial and importing it into the various keybinding partials.
I thought about splitting action too, but actions can be called by multiple events except Keys. For example someone have a button in status bar or call an action with the action menu. I think every time should all actions be included.
The difference between generic and include was that files in included added automatically and generic must be included manually. But it is ok to merge both into generic.
@nougad Your commit is merged into master.
@wabu The ability to nullify a previous key during merge seems useful for other purposes. I'll try to merge your commits tomorrow.
Although this minimal subset approach increases the complexity of the overall configuration, it makes it really easy to diff the various keybindings. Try it; I'm surprised how similar they are.
wabu: I have merged your commit at sunaku/wmiirc@285683326f3cb0ac8f482d37d8a1f8e10fb26e3d
Please verify and close this issue. Thanks.
splitting the keybindings and undefining a value both help, thanks.
when importing a keyboard files, one can customize some shortcuts by overriding them, but removing an imported shortcut is impossible, as the yaml merge algorithm ignores nil values.