feat(config): adding the option to explicitly state the source file
Hey,
I like to mirror the structure of the config directory in my dotfiles, and I encountered an issue when I had to use a complex target. This problem was that my path couldn't be used as a toml section ([sway.files."fish/conf.d/sway.fish"]). So I made the following change:
-- Commit Body --
This modification allows to specify the source file in a "file" key for complex targets. Using this key overrides the path deduced from the TOML section header or the TOML key.
Examples:
[sway.files.fish]
source = "fish/conf.d/sway.fish"
target = "~/.config/fish/conf.d/sway.fish"
type = "symbolic"
[sway.files]
fish = { target = "~/.config/fish/conf.d/sway.fish", type = "symbolic", source = "fish/conf.d/sway.fish" }
Finally got around to knocking some issues out. Could you explain why the path can't be used as a toml section? The syntax you posted looks like it would work...
Thanks for taking your time to check my PR, I confirm that it does work... I can't remember what exactly the error was, I might have misread something.
But maybe it could still make some sense to include the modification as I think that [sway.files.fish] is more legible than [sway.files."fish/conf.d/sway.fish"]