A Unix dotfiles manager inspired by, and compatible with stow.
dotin organizes your config files in the ~/dotfiles folder. It is great if you want to:
- Backup and version your configs (with
git). - Easily re-apply them in another machine (with
dotin link). - Maintain changes in sync between machines (with
git). - Use a simple tool.
- Usage (with example)
- Setup
- Sync with GitHub
- Reapplying changes in a new machine
- Differences from
stow - Known limitations
- Alternatives
Say you configured a tool, like polybar, and files are laid like this:
~
├── .scripts/
│ ├── volumescript.sh
│ └── kb-layout.sh
└── .config/
└── polybar/
├── config.ini
└── launch.shAfter hours of configuring, I bet you don't want to lose those files.
Create the group polybar at ~/dotfiles/polybar, and structure it similarly:
~/dotfiles/
└── polybar/
├── .scripts/
│ ├── volumescript.sh
│ └── kb-layout.sh
└── .config/
└── polybar/
├── config.ini
└── launch.shYou can move files manually, or just use dotin import:
dotin import polybar .config/polybar
# OR
dotin import polybar .config/polybar/*Now your configs are missing, use dotin link to link them back to their original location:
dotin link polybarDone! Your configs are in place and can be edited using the same path as before, but now, they can be saved in a repository.
The usual GitHub repository setup:
cd ~/dotfiles
# In GitHub, create a repository with no README, and follow their instructions or run these:
git init
git commit -a -m "dotfiles repository setup"
git remote add origin <REPOSITORY_URL>
git push -u origin HEADgit clone URL
cd dotfiles
dotin link polybarDone, files are linked to the correct locations (conflicts are reported, if any).
If installing dotin is too hard, use stow for linking the instead!
sudo apt install stow
cd ~/dotfiles
stow polybardotin uses the same tree structure as stow, you can use both in the same repository.
Here is how dotin differs from stow:
- The
importsubcommand. - Better checks and error messages.
- Can be run from any directory.
- Expects
"$HOME/dotfiles".
- Expects
- Creates directories (like
mkdir) when possible, whilestowprefers to link.- In my experience, this avoids accidents.
dotincan link files and directories, but other file types aren't supported yet.- Can't change dotfiles folder path.
- Wrap
gitusage. - Templating.
- Encryption.
- Secrets management.
stow.- Recommended, but overall a worse experience, and easier to mess up.
- Create a script to link and copy everything.
- Wastes your time, remember to cover corner cases if you don't want to mess up.
- Make your
$HOMEdirectory a repository and.gitignoreeverything.- Annoying to edit
.gitignorefor each file. - If you use
giton a daily, especially with shell integration, it can be quite annoying, every folder you enter will be considered part of the repository. - If these don't bother you, read this.
- Annoying to edit
- Use
dotbotinstead. - Use
mackupinstead. - Use
chezmoiinstead. - Use some other tool.
- Use some
git-wrapping tool.