Anselm R Garbe wrote: > On 26 October 2016 at 20:30, Markus Teich <[email protected]> wrote: > > this patch allows for a flexible amount of different colorschemes in > > config.h without having to edit dwm.c as well. Applying this upstream would > > help patches like urgentborder and statuscolors with the new drw mechanics. > > This patch has no benefit to core dwm at all, but since it's an improvement > > for the ecosystem, you might want to consider merging it to the dwm source. > > Why wouldn't dwm just work fine without this change, if editing config.h would > incorporate assigning SchemeLast with a value instead? Then all the nasty > heap allocation would become unnecessary.
Heyho, that would be the other option I considered. I choose the heap one to reduce config.h complexity. You would have to make sure SchemeLast and the size of `colors` stay the same manually which is more error prone than letting the code figure it out. However if you think that is a better option, I'd adapt the patch accordingly. --Markus
