Skip to content

Add argument handling and run karuirpc script at startup (REMOVES CONFIG.H)

Tinu Weber requested to merge args into master

First, add a component that parses commandline arguments (named commandline.c—now no longer a thing for processing RPC commands). It takes elements in the form [subcmdline.]key=value (where subcmdline. is an optional prefix that can be used to build a "sub-commandline", and thus by extension a "commandline tree"). For now, the idea is to pass these sub-commandlines to the respective modules (as soon as those become an actual thing).

Second, add a mod_init components (another component that should one day become a modules, as indicated by its name already), which simply execs a script. The script runs a karuirpc script in the users config directory, or a default one provided by karuiwm itself. The default one sets up the equivalent configuration that was previously in legacy_config.h. The script to be executed can be changed with the init.path=… commandline argument.

Third, remove legacy_config and—as a consequence—config.

🎉

Besides that, fix some miscellaneous bugs:

  • Properly bind key/button if it is added to a currently active key/button map (not just when a map is activated).
  • Fix erroneous processing of nested quotes (single quotes inside double quotes and vice versa).
Edited by Tinu Weber

Merge request reports