There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

How could GNU Stow help me with my configuration files?

Once again I try to get a handle of my various dotfiles and configs. This time I take another stab at gnu stow as it is often recommended. I do not understand it.

Here’s how I understand it: I’m supposed to manually move all my files into a new directory where the original are. So for ~ I make like this:


<span style="color:#323232;">~
</span><span style="color:#323232;">  - dotfiles
</span><span style="color:#323232;">      - bash
</span><span style="color:#323232;">         dot-bashrc
</span><span style="color:#323232;">         dot-bash_profile
</span><span style="color:#323232;">      - xdg
</span><span style="color:#323232;">            - dot-config
</span><span style="color:#323232;">                user-dirs.dirs
</span><span style="color:#323232;">      - tealdeer
</span><span style="color:#323232;">            - dot-config
</span><span style="color:#323232;">                - tealdeer
</span><span style="color:#323232;">                       config.toml
</span>

then cd ~/dotfiles && stow --dotfiles .

Then (if I very carefully created each directory tree) it will symlink those files back to where they came from like this:


<span style="color:#323232;">~
</span><span style="color:#323232;">  .bashrc
</span><span style="color:#323232;">  .bash_profile
</span><span style="color:#323232;">   - .config
</span><span style="color:#323232;">        user-dirs.dirs
</span><span style="color:#323232;">      - tealdeer
</span><span style="color:#323232;">          config.toml
</span>

I don’t really understand what this application is doing because setting up the dotfiles directory is a lot more work than making symlinks afterwards. Every instructions tells me to make up this directory structure by hand but that seems to tedious with so many configs; isn’t there some kind of automation to it?

Once the symlinks are created then what?

  • Tutorials don’t really mention it but the actual manual gives me the impression this is a packager manager in some way and that’s confusing. Lots of stuff about compiling
  • I see about how to combine it with git. Tried git-oriented dotfile systems before and they just aren’t practical for me. And again I don’t see what stow contributing; git would be doing all the work there.
  • Is there anything here about sharing configs between non-identical devices? Not everything can be copy/pasted exactly. Are you supposed to be making git branches or something?

The manual is not gentle enough to learn from scratch. OTOH there are very very short tutorials which offer little information.

I feel that I’m really missing the magic that’s obvious to everyone else.

ma1w4re ,

Recreating a path to original locations is a way to configure stow.

You can utilize bash to automate it. Mkdir can create entire trees in a single command.

After links were created you start using your configured software.

It’s a link farm built using a packaging system. You put your configs into a “package” and then link said package where it belongs.

Git is useful not as a combination for stow, but a standalone way to version control your configs.

For nonidentical devices you create additional packages prefixed with specific device name. You don’t need to link all packages at once with stow, pass a name of a package to link it alone.

linuxPIPEpower OP ,

For nonidentical devices you create additional packages prefixed with specific device name. You don’t need to link all packages at once with stow, pass a name of a package to link it alone.uuu

Sooo… I find some way to share the dotfiles directory across devices (rsync, syncthing, git, nextcloud, DAV) then make specific subdirs like this?:


<span style="color:#323232;">~
</span><span style="color:#323232;">  - dotfiles
</span><span style="color:#323232;">      - bash-desktop
</span><span style="color:#323232;">         dot-bashrc
</span><span style="color:#323232;">         dot-bash_profile
</span><span style="color:#323232;">      - bash-laptop
</span><span style="color:#323232;">         dot-bashrc
</span><span style="color:#323232;">         dot-profile
</span><span style="color:#323232;">         dot-bash_profile
</span>

But what is the software doing for me? I’m manually moving all these files and putting them together in the specific way requested. Setting the whole thing up is most of the work. Anyone who can write a script to create the structure can just as easily write it to make symlinks. I’m sure I’m missing something here.

traches ,

There are other dotfile managers out there, personally I use yadm. It’s just a shell wrapper around a bare git repository, no symlinks or other magic needed

linuxPIPEpower OP ,

yadm is the one I liked the best and tried it a few times. fact is that I am unlikely to keep a repo like this even part way up to date. New files are created all the time and not added, old ones don’t get updated or removed. There’s not even a good way to notice in any file manager what is included and what’s not as far as I know. yadm doesn’t work with tools like eza which can display the git status of files in repos. (and it probably wouldn’t be feasible.)

Plus I have some specific config collections already in change tracking and it makes more sense to keep it that way. Having so many unrelated files together in one project is too chaotic and distracting.

It’s not realistic for me to manage merges, modules, cherry picking, branches all that for so many files that change constantly without direct intervention. Quickly enough git will tie itself into some knot and I won’t be able to pick it apart.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines