gbrlsnchs / pilgo

Configuration-based dotfiles manager
MIT License
85 stars 4 forks source link

Support multi platform/target dotfiles #5

Closed kakawait closed 4 years ago

kakawait commented 4 years ago

Currently I own multiple devices with different usage, I'll present my own case but I could be help others too:

  1. MacOS professional usage
  2. Archlinux home usage
  3. Archlinux server usage (raspberry). That mean no GUI

I'ld like to have only one dotfiles git repo (because many of conf is shareable) but some strategy to tell if which files should be linked or not depending on platform (autodetection is no needed, platform must be passed by user).

For example prevent any i3 and other GUI things on server platform. Same for OSX some should be shared other are specific.

Describe the solution you'd like (and/or alternative)

I'm open to any kind of solutions, I'll just expose some of my idea.

  1. Labelling/tagging paths on yaml conf

And be able to pass labels/tags to select only what you want

  1. Support multiple yaml conf in same repo and allow plg command to give path of wanted configuration like plg -c /path/to/osx.yml ...
gbrlsnchs commented 4 years ago

Hi @kakawait, thanks for the idea.

Yeah, that's something I thought about when creating Pilgo but didn't prioritize it before. I'd love to work on this feature, and tagging paths (via plg config) sound nicer than maintaining several configurations.

You can follow progress in the roadmap for this issue. I'll soon pick it to work on it.

gbrlsnchs commented 4 years ago

@kakawait One thing I forgot to comment is that number 2 is already implemented. To use a different config file, just pass an option to the main command:

$ plg -config=other.yml link

To check all options and commands, run plg -h.

Anyway, tags will be implemented nonetheless.

gbrlsnchs commented 4 years ago

@kakawait This feature has been released in v0.5.0. :smile:

I'll soon add an entry to the Wiki about tags, but you can guide yourself via the CLI help options.

kakawait commented 4 years ago

Nice thank you. I saw other cool things on this release like merge. I'll give a try asap

gbrlsnchs commented 4 years ago

@kakawait Merging didn't make it, unfortunately. I couldn't come with a good UX for it.

The closest to merge is having two modes now, one when using config and one when using scan. scan fills targets without overwriting options, while config resets unset options without touching targets.

This was due to scanning new files being quite common, so it made no sense to reset options whenever a new target scan was made. Meanwhile, a complete merge made no sense too: a user wouldn't be able to zero options with merge. Therefore, I left it out.

If you feel something's missing, don't hesitate to open new issues. Pilgo is still in early stage and there's still lots of discovery to be done.