News for hackers. Stuff that matters.
Re:Unofficial guide to dotfiles on GitHub by Aarvay on Monday August 29, 2022 @04:29AM (#32635925)
Just wanted to mention Stow[1] here, which I use to symlink my dotfiles on a new machine on a per app basis for many years now. My set up script just installs basic compiler toolchain and runs a bunch of stow commands based on Linux/Mac OS. I also adhere to XDG base spec[2] so I can keep my ~/ clean.

1: https://www.gnu.org/software/stow/ 2: https://wiki.archlinux.org/title/XDG_Base_Directory

Re:Unofficial guide to dotfiles on GitHub by Kolja on Monday August 29, 2022 @07:16AM (#32636787)
Also, the latest version (>= 2.3.0, released June '19) has a new flag specific to managing dotfiles. When passing `--dotfiles`, stow replaces `dot-` at the beginning of filenames with `.` in the symlinks. The online help does not mention it, but the release notes and man pages do.
Re:Unofficial guide to dotfiles on GitHub by petepete on Monday August 29, 2022 @05:10AM (#32636153)
Stow is the answer as far as I'm concerned. It's been around forever, it's standard, available in every package manager, the defaults just work.

I use it in combination with a make to automate the setup of a new install.

Re:Unofficial guide to dotfiles on GitHub by EduardoRT on Tuesday August 30, 2022 @05:01PM (#32655016)
Yeah, I don't understand why people like reinventing the wheel, Stow works, Make works, both are available everywhere, you don't need 30 layers of JS to manage dotfiles, I'm not against progress, but at least make something better than what's already around.
Re:Unofficial guide to dotfiles on GitHub by rovr138 on Monday August 29, 2022 @09:21AM (#32637866)
I really like stow. It handles almost everything for me.

One thing, I didn't split things by apps per se. I split them based on task. In some machines, I do Python work, so I created a 'python' package. In some I do PHP, so I created a 'php' one. I have a 'base' one where it has my .bashrc, .profile, .bash_profile, fish configs and other things.

Everything in the .bashrc. .profile, etc is loaded around conditionals. So, while the files are long, the section only activates if the other package is available. I thought about splitting it onto files, but most editors have a way of collapsing sections, so I decided to keep it on one so it's easy to edit in one place.

Re:Unofficial guide to dotfiles on GitHub by ibnishak on Tuesday August 30, 2022 @04:20AM (#32647939)
How do you manage dotfiles of apps that overwrite symlinks? Eg: Xfce frequently does it.
Re:Unofficial guide to dotfiles on GitHub by allendoerfer on Monday August 29, 2022 @07:27AM (#32636858)
I do not like comments, which are basically upvotes, but yes, Stow is the answer and this should be the top comment.