- Published on
Managing Dotfiles with Stow
GNU stow keeps my dotfiles setup predictable, and it still feels underused. Configs live in a normal git repo, and stow projects them into the paths each tool expects.
For example, tmux expects ~/.tmux.conf. The file lives at ~/configs/tmux/.tmux.conf, and stow creates the symlink at ~/.tmux.conf.
My ~/configs layout looks like this:
➜ tree -L 4 -a -I .git ~/configs
/home/matt/configs
├── compton
│ └── .config
│ └── compton.conf
├── fish
│ └── .config
│ └── fish
│ └── config.fish
├── i3
│ └── .config
│ └── i3
│ └── config
├── kitty
│ └── .config
│ └── kitty
│ └── kitty.conf
├── nvim
│ └── .config
│ └── nvim
│ ├── coc-settings.json
│ └── init.vim
├── polybar
│ └── .config
│ └── polybar
│ └── config
├── tmux
│ └── .tmux.conf
└── zathura
└── .config
└── zathura
└── zathurarc
21 directories, 9 files
Applying links:
➜ cd ~/configs
➜ stow compton fish i3 kitty nvim polybar tmux zathura
Removing one package:
➜ cd ~/configs
➜ stow -D nvim
This setup keeps a clean change history, makes rollback easy, and preserves the same config shape across machines.
My configs: https://github.com/mattkubej/configs