Features for hierarchical config distibution #10315
Unanswered
Vladimir-csp
asked this question in
Feature requests - Config
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This will intersect with #8470, as there needs to be some way of sourcing files dynamically, also ignore missing files.
Hierarchical config distribution would assume loading
hypr/hyprland.conffrom:$XDG_DATA_DIRS(reversed) as low-priority upstream or distribution default configuration$XDG_CONFIG_DIRS(reversed) as local admin level config,$XDG_CONFIG_HOMEas the highest priority.It can be done either internally in hyprland itself, or in user's config. The latter variant might give users more control.
A static and very barebone version of this can be done with what Hyprland already has, if the default user config would be initiated from a different source and contained this:
A more sophisticated model would require support for variable expansion and item reversal:
source_multipathkeyword andenv()tokenExplanation:
Syntax of
source_mutlipath:path_list, delimiter, subpath, flagsenv()token returns value from variable. For example,$XDG_DATA_DIRSusually contains/usr/local/share:/usr/share,$XDG_CONFIG_DIRSmight contain/usr/local/etc:/etcor just/etcdepending on distro.Delimiter is ':'
Subpath is
hypr/hyprland.confeverywhere.Flag
reversereverses the path list, to load from/usr/share, then/usr/local/share.Flag
ignoremissingsuppresses errors on missing files.Potentially flag
firstfoundmight be used to source only the first found file instead of all. This can be used for non-overriding config model, withoutreverse.To also help with #8470 use case,
pipe()token would be useful:Beta Was this translation helpful? Give feedback.
All reactions