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.sh
After 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.sh
You 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 polybar
Done! 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 HEAD
git clone URL
cd dotfiles
dotin link polybar
Done, 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 polybar
dotin
uses the same tree structure as stow
, you can use both in the same repository.
Here is how dotin
differs from stow
:
- The
import
subcommand. - Better checks and error messages.
- Can be run from any directory.
- Expects
"$HOME/dotfiles"
.
- Expects
- Creates directories (like
mkdir
) when possible, whilestow
prefers to link.- In my experience, this avoids accidents.
dotin
can link files and directories, but other file types aren't supported yet.- Can't change dotfiles folder path.
- Wrap
git
usage. - 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
$HOME
directory a repository and.gitignore
everything.- Annoying to edit
.gitignore
for each file. - If you use
git
on 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
dotbot
instead. - Use
mackup
instead. - Use
chezmoi
instead. - Use some other tool.
- Use some
git
-wrapping tool.