Open d2718nis opened 7 months ago
Just thought of another option: automatically include files based on directory structure, for example include all drop-in configuration files from $XDG_CONFIG_HOME/swaylock/config.d/*.conf
and other default locations based on priority defined in the manual. In theory this would be much easier to implement
Description
I wish there was an option to include parts of configuration files from other places. For example, it would be great to have an option to apply themes.
Example
This most likely should use the modified
load_config
from hereMotivation
Right at the moment I have two (and a half) ways to install a theme from a third-party:
Some thoughts
Should be able to expand
~
symbol as a user home directoryis expanded to
The priority should work the same way it works right now: the value of the lowest (by line count) setting is applied Imagine a configuration file
The contents of the
/tmp/colors
are:The
color=#ffffff
from the original config file should overwrite thecolor=#000000
line from the/tmp/colors
file.Not sure if it should have a maximum include depth, but I do not see any reasons to have any restrictions on that
Keep in mind the recursion: if two files are including each other, there should be a way to prevent that by either of:
Could be also useful to expand environment variables, some of them are quite useful, for example
$HOME
or$XDG_CONFIG_HOME
Additional info
I thought about using the
--config
as along-option
like this:But the manual page specifically states that you can't do that with the
--config
option:Therefore it didn't work.