News for hackers. Stuff that matters.
Re:Using GNU Stow to manage your dotfiles (2012) by j1elo on Wednesday July 27, 2022 @01:49PM (#32253842)
It's 2022 and I still use this program since I read that article so many years ago.

It's handy but sometimes a bit of manual preparation must be done on a new clean machine. For example if you want to stow only some files under ~/.config/program/ and not the whole program/ directory, you must first run an mkdir and then run stow to put the appropriate symlinks in place.

Re:Using GNU Stow to manage your dotfiles (2012) by BrotherBisquick on Wednesday July 27, 2022 @07:06PM (#32258248)
To reiterate, the --no-folding flag prevents creation of symlinked directories, and it really should be the default behavior.

I don't blame you for not knowing about this flag. Here's its description in the manpage:

> Disable folding of newly stowed directories when stowing, and refolding of newly foldable directories when unstowing.

This is confusing because it's a circular definition. It doesn't explain what "folding" means. It should just read, "prevents creation of symlinked directories" or something.

Re:Using GNU Stow to manage your dotfiles (2012) by j1elo on Friday July 29, 2022 @08:46AM (#32276163)
Problem is, this still makes sense in some cases but doesn't in others, and stow, as it is, doesn't care about the distinction.

For example, on a machine where ~/.config/autostart/ doesn't still exist, I do not want that either ~/.config or ~/.config/autostart are created as symlinks to my stowed package; otherwise any newly installed file, from unrelated apps, would end up in my package! I just want this path to exist as a proper dir, and only contain whatever symlinks are needed from stow. Thus an `mkdir -p` is still needed before running stow.

On the other hand, I do want that ~/.config/wireshark/ is a symlink to the stow repository. So no mkdir in this case.

Regardless, having a script that adds extra per-package pre-process/post-process logic before/after running stow is still needed, anyway.

Re:Using GNU Stow to manage your dotfiles (2012) by heyoni on Wednesday July 27, 2022 @01:51PM (#32253878)
I use this too but every other time I come back to it I have to really read through the docs to figure stuff out. That’s just me not writing very useful notes though -_-
Re:Using GNU Stow to manage your dotfiles (2012) by marcinreal on Wednesday July 27, 2022 @02:29PM (#32254505)
When I did the setup I kept the commands I used in a Makefile. In theory, running `make` should do all the setup for me on a new machine.
Re:Using GNU Stow to manage your dotfiles (2012) by lasftew on Wednesday July 27, 2022 @03:04PM (#32255125)
Use the --no-folding flag to prevent stow from linking directories.