Skip to content

FR: multiple configuration files #489

@pataquets

Description

@pataquets

I really like i3blocks simplicity and customization. Thanks!
I use it in several machines and different users. I keep conf files in a private repo. However, maintaining confs becomes quite cumbersome.
I think it would be useful in lots of scenarios to be able to merge different conf files when starting i3blocks. Here's an incomplete use cases list:

  • OS-packaged conf are mostly ok and you only want to override or add just a single specific block, so you first read /etc/ conf and later you read XDG's conf dir on top.
  • Allowing users to have their personal conf, but giving them some base, default conf on some "common" user-accessible dir (I know, it's almost the same as above, just listing here just as another usage scenario for completeness, albeit with identical solution).
  • Having a base, common conf file for all host, with host-specific confs (eg. add wifi/batt/etc for laptop).
  • In general, any scenario where some sort of conf selection logic would be useful (can't come with more examples, as of now). Currently, you need different files for each conf variation.

Accepting several -c command-line switches would do. Merge conf files in order, later files override previous'.
Alternatively, some kind of include statement might solve some cases, but I guess it might fall short on some scenarios, or at least require a more involved crafting/maintenace of the conf files.

EDIT: forgot to link to related issue #417, which came up when searching and might be an alternate solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions