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.
🎉
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 into path not found errors on linux where home directory is /home/mandar
One precaution you may take is to use $HOME rather than actual path.
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.
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:
Community first Technologist @Veeam @KastenHQ A big interest in DATA, and growing urge to learn more about Kubernetes, Cloud Native, and the Future of Software
Location
UK
Work
Senior Global Technologist at Kasten by Veeam Software
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!
We're a place where coders share, stay up-to-date and grow their careers.
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 founderrors on linux where home directory is/home/mandarOne precaution you may take is to use
$HOMErather 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.
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
.dotfilesin the way I described in this post, I had a.configdirectory 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.dotfilesdirectory.stowrealizes this, and instead of symlinking the entire.configdirectory, it goes one level deeper and symlinks the stowed directory. This preserves the rest of the folders in.configfrom being symlinked.So what this looks like using a stowed
nvimdirectory:Hope this answers your question!
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
stowin my opinion. But different strokes!