dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Adding support for non-dot config files

Open MarvinTeichmann opened this issue 8 years ago • 5 comments

Lots of applications have started to put their config files in configuration folders like .config or .kde. The current behaviour when trying to add ~/.config/mytest.conf is the following.

dotfiles -a ~/.config/mytest.conf Skipping ".config/mytest.conf", not a dotfile

Maybe it is possible to use your codebase to also archive those files. One could use a special prefix to keep track of the files which do not start with a dot (e.g. _). Alternative one could assume, that if files are located in a dotfolder that they are non-dot config.

What do you think of those solutions? I am happy to have a look in your code and potentially send a pull request, if those changes are appreciated.

MarvinTeichmann avatar Jul 09 '16 18:07 MarvinTeichmann

Hey Marvin, give the code in master a try. I've reworked quite a few things and although I've been quite busy lately, I am working on making a release soon (I swear).

The new code will decend into subdirectories and perserve that structure in your repository, so all that you're left with is a directory structure and a final symlink to the configuration file you care about. It is not the same behaviour as the old approach, but it's better this way I think.

Let me know what you think, cheers,

jbernard avatar Jul 09 '16 19:07 jbernard

@jbernard The new code in master looks good and it's working a treat for nested file structures; and the new CLI structure is much more intutitve, thanks! The only thing I've found is that the configuration from a .dotfilesrc isn't loaded -- seemingly that's not yet implemented, so I'm sure you already know about it.

davidjb avatar Dec 10 '16 05:12 davidjb

@davidjb Thanks a lot for the kind words, it really means a lot to me. I have no idea how many (if at all) people use this thing, so it's always nice to hear when someone finds it useful.

I still have future plans for improvement, but I became a father earlier this year and things have been so crazy. I'm hoping to find some time over the holidays, I have several things queued up.

jbernard avatar Dec 12 '16 20:12 jbernard

Yeah, I purposely tried to not implement config file parsing - I wanted to see how far I could get without it with the goal being to provide enough default behaviour that addition configuration is not needed. That was the intent anyway.

jbernard avatar Dec 12 '16 20:12 jbernard

@jbernard Your tool is really excellent; I had been looking at other similar managers but they're not nearly as clear or logical. So yes, many thanks are in order!

As for the config file, this is what I was using: https://github.com/davidjb/dotfiles/blob/master/dotfilesrc -- essentially just three things: a way of setting the dotfiles repository location, the ignore list and the externals link. A similar way of customising those over the defaults would be ideal.

davidjb avatar Dec 13 '16 00:12 davidjb