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:
~
- dotfiles
- bash
dot-bashrc
dot-bash_profile
- xdg
- dot-config
user-dirs.dirs
- tealdeer
- dot-config
- tealdeer
config.toml
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:
~
.bashrc
.bash_profile
- .config
user-dirs.dirs
- tealdeer
config.toml
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
. Triedgit
-oriented dotfile systems before and they just aren’t practical for me. And again I don’t see whatstow
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.
Sorry if it comes out robotic, since I don’t use stow myself I just opened the manual and parsed it for you.
You manually create the repo of packages ONCE and then use stow to deploy them without having to link stuff manually every time.
As for “what’s it doing for me”, stow is just a generic deployment script that somebody else has written for you. You can just as well create your own and do it your way.
I personally used to have a bash script with one custom function “symlink” that error checked the linking process and a list of target/destination under the function.
Now I’m trying to code a python script similar to stow that works with packages of configs but instead of recreating paths inside the package you just provide a json file with target/destination for each file in the package.
Both of my ways have same shortcoming as stow: you have to do some manual work before the script can kick in.
Hopefully my messages have been helpful.