![]() |
dwm-libconfig 6.8
Runtime configuration parsing for dwm using libconfig.
|
It may be worth trying to add some kind of safeguard to fall back on default config if enough elements fail to be parsed. For example, if the keybinds all (or many) fail, it could soft-lock the user in the program. Not sure best way to do that, or if it is even the best idea to add.
The logic around malloced and null checking parsed_config before allocation is brittle, needs work.
These error returns may not be the most accurate, not sure exactly the best fits.
Should the parser even look for another config file if one is passed from the CLI? Could be deceptive behavior.
Polish the status texts a little. I like the idea but could be refined.
Backup config file logic is clumsily structured, it should be improved. It also probably should include rules_malloced
Finish documentation. Make sure function arguments are noted for being dynamically allocated in that function or its sub functions.
Overhaul printing / logging to match the new error handling.
Try and reduce the number of unique string literals throughout the parser. Tons are used for logging, inflating binary size by 8kb.