Okay, so I've been reading about dotfile management apps such as GNU Stow, and I love the idea. I have a good grasp on how it works. Seems like it should work flawlessly for corralling all my dotfiles into one folder so I can easily clone them across machines. Makes sense for apps whose config folders and files are named something static like ~/.config/appname/settings.conf.

That said, can somebody help me understand the cloning/syncing workflow for apps that generate folders and/or files with dynamic/random/inconsistent names? For example, I'm thinking of Firefox, which creates folders with seemingly random strings for each profile.

Do I just need to clone my Firefox profiles before I launch Firefox for the first time on a new machine? Can I configure GNU Stow w/ something like *.Profile for the top level folder name? Am I doomed to manually syncing my Firefox settings, or is there some other trick for handling these dynamically named configs that I haven't come across in the tutorials yet? This little cliff hanger is pretty much the last thing stopping me from installing GNU Stow at this point. Thank you!

you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 10 months ago (3 children)

Stow has no “glob for target” option, so you can't do *.profile.

You could write a script that, when you're deploying a stow, symlinks the profile into the right location. You'd have to remember to run it in the future so create a README file and include the instructions.

  • source
  • hideshow 3 child comments
  • [–] [S] 1 point 10 months ago* (2 children)

    You mean write a script with something like find followed by stow --target=/path/to/profile/folder firefox?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 10 months ago

    Yeah, exactly. You could glob with find to locate the directory, store the path in a variable and then pass that to stow.

    I'm not sure what you have to do to make Firefox acknowledge the profile, but I believe it simply enumerates all of the folders in the directory and displays all that are valid (but definitely double check on that first).

  • source
  • parent
  • [–] 1 point 10 months ago

    I just look for the folder with -release on the end

        PROFPATH=$(grep 'Path=' $HOME/.var/app/org.mozilla.firefox/.mozilla/firefox/profiles.ini | sed s/^Path=// | grep release)
    
  • source
  • parent