raboof / notion

Tiling tabbed window manager
https://notionwm.net/
GNU Lesser General Public License v2.1
268 stars 63 forks source link

bindmap allocation #276

Closed buhl closed 4 years ago

buhl commented 4 years ago

Can anybody tell my why it's only allowed to create bindmaps that have been preallocated in C first. https://github.com/raboof/notion/blob/67174dd4865a65b99509365fd2712aa4b38441a0/ioncore/bindmaps.c#L173-L179

I would like to be able to create bindmaps in my config on startup that has not been allocated by a C module yet.

What do you guys think about adding an auto_allocate (or something like that) to ioncore_do_defbindings that defaults to false? This will make the code behave as always with the options to allocate and create from lua.

buhl commented 4 years ago

I will attempt a PR if people like the idea

raboof commented 4 years ago

Go for it! If this works out I'm not even sure we need the 'auto_allocate' flag, we could just always implicitly create the map if it doesn't exist yet.