I'm going to assume you are reading this because:
you have one or more dotfiles lying around and you don't know how to organize them.
you heard t...
For further actions, you may consider blocking this person and/or reporting abuse
I use similar approach.
I do have dotfiles repo on GitHub that is severely outdated. Instead I have all my dotfiles in a folder called dotfiles in Dropbox.
I symlink them to my home folder.
Benefit : I don't have to remember to git commit/push. They are automatically saved by Dropbox.
🎉
I do that too. They're small, so it's free. Yay. I do the same thing with my second brain - Logseq, Obsidian and Craft
I just use chezmoi github.com/twpayne/chezmoi , it uses git to store the dot files for me, it's great
Oh this is great.... I have already put most of my dotfiles in a .dotfiles folder using the same structure, but by hand, invoking the symlink command:
ln -s .dotfiles/package/ ~/
I am in the middle of doing this right now, lol. My question is if I install stow, will it mess up my directory?
Second, if I use snow, and say, import my .dotfiles from my MacBook Pro 16 to my MacBook Pro 15 -> running Lenox, will my Lenox machine recognize them and can it use them?
Also, I tested everything to make universal commands on the Mac to make the symlink in my home directory invisible even when show hidden files are on.
I was also considering doing the same things to manage my paths and executables. Not for back up, only to have them all in one simple place. Like Crontab
About your second question, I'm not sure what Lenox mean. I'm assuming you mean linux.
If that is the case, I've been there.
The problem I faced is that some of my dotfiles had absolute path to the home directory which on macOS is like
/Users/mandar
- This results intopath not found
errors on linux where home directory is/home/mandar
One precaution you may take is to use
$HOME
rather than actual path.Hey Jeremiah,
Stow is pretty sophisticated. It shouldn't mess up your directory.
To answer your second question, you should git clone your .dotfiles directory onto the other machine, install stow and then run stow for each subdirectory within .dotfiles to ensure your configs get placed into the right part of your machine.
I accumulated a lot of conf using this method 👍 Here are my dotfiles github.com/bdelespierre/dotfiles
Nice Benjamin!
Great post but I would argue a git bare repo / folder is a better way to go vs symlinks?
Hey Michael thanks for the reply! I've used git bare repos in the past and always felt confused by them. They aren't as intuitive as using
stow
in my opinion. But different strokes!What happens when you have two or more packages that use . config/ ? Will it still try to symlink that directory? It would be much better to make sure the directory is created and only symlink files.
Great question! I can only answer from experience. There may be a more sophisticated answer.
Before setting up my
.dotfiles
in the way I described in this post, I had a.config
directory with a few subdirectories for packages I use routinely. I don't need to version control these packages, so they aren't stowed in my.dotfiles
directory.stow
realizes this, and instead of symlinking the entire.config
directory, it goes one level deeper and symlinks the stowed directory. This preserves the rest of the folders in.config
from being symlinked.So what this looks like using a stowed
nvim
directory:Hope this answers your question!