My personal dotfiles, managed with GNU Stow.
Config file headers with text ASCII art (e.g. Fish config):
toilet -f future -F border "Fish config"Managing your shell and application configurations (“dotfiles”) with Stow allows you to:
- Keep configurations versioned in Git.
- Easily deploy consistent setups across machines.
- Modularize per-application configs.
This guide covers both non-root (“user”) and root (“system”) setups.
-
Git: for cloning this repo.
-
GNU Stow:
# Debian/Ubuntu sudo apt update sudo apt install stow # Arch Linux sudo pacman -Syu stow # macOS (Homebrew) brew install stow
git clone https://github.com/gubasso/dotfiles.git ~/.dotfiles
cd ~/.dotfiles-
Dry run to preview changes:
stow -nvt ~ *
-n/--no: show what would happen (don't apply).-v/--verbose: detailed output.-t ~/--target=~: where to create symlinks.*: all packages (every directory).
-
Apply symlinks:
stow -vt ~ *
-
Link a single package (e.g., Alacritty):
stow -vt ~ alacrittyThis creates symlinks from:
~/.dotfiles/alacritty/.config/alacritty/*.yml → ~/.config/alacritty/*.yml -
Link multiple packages:
stow -vt ~ bash nvim git
When you need to manage system configs (e.g., services in /etc/systemd), perform Stow under root:
Stow to /:
sudo stow -vt / systemd_root bin_root shell_root-
-t /: target is the filesystem root. -
--adopt: (optional) move existing files into the repo before linking:sudo stow -vt / --adopt systemd_root
Based on your repository tree:
-
Alacritty:
cd ~/.dotfiles stow -vt ~ alacritty
-
Custom Scripts (
bin):stow -vt ~ bin -
User Shell Configs (
bash,zsh):stow -vt ~ bash zsh -
Systemd Services (
systemd_root):sudo stow -vt / systemd_root
-
Root Shell Environments (
shell_root):sudo stow -vt / shell_root
-
Conflict Detected: If Stow reports existing files not owned by it, you can:
stow -nvt ~ --adopt bashto move originals into
~/.dotfiles/bash/then retry. -
Inspecting Symlinks:
find ~/.config -maxdepth 2 -type l