This repository contains my personal dotfiles managed using GNU Stow. This setup allows you to quickly configure a new system with my preferred environment, including Zsh, Git, Tmux, and Neovim.
- zsh -
.zshrc
,.zprofile
, and Powerlevel10k theme configuration. - git -
.gitconfig
. - tmux -
.tmux.conf
. - nvim - Neovim configuration files under
.config/nvim
.
To start tracking your configuration files with this dotfiles repo:
-
Create a Directory for Each App
For each tool (e.g., zsh, git), create a directory inside your dotfiles repo:
mkdir -p ~/dotfiles/zsh mkdir -p ~/dotfiles/git mkdir -p ~/dotfiles/tmux mkdir -p ~/dotfiles/nvim/.config/nvim
-
Move Your Existing Config Files
Move your config files into the corresponding directories. For example:
mv ~/.zshrc ~/dotfiles/zsh/ mv ~/.zprofile ~/dotfiles/zsh/ mv ~/.p10k.zsh ~/dotfiles/zsh/ mv ~/.gitconfig ~/dotfiles/git/ mv ~/.tmux.conf ~/dotfiles/tmux/ mv -r ~/.config/nvim/* ~/dotfiles/nvim/.config/nvim/
Tip: Backup your configs before moving.
-
Symlink with Stow
From your dotfiles directory, run:
cd ~/dotfiles stow zsh stow git stow tmux stow nvim
This will symlink the files back to their original locations.
-
Install Git and Stow
# Debian/Ubuntu sudo apt update sudo apt install git stow # macOS brew install git stow
-
Clone the Repository
git clone [email protected]:yourusername/dotfiles.git ~/dotfiles cd ~/dotfiles
Replace
yourusername
with your GitHub username. -
Symlink Your Configurations
stow zsh stow git stow tmux stow nvim
Your dotfiles are now active on the new machine.
-
Edit Your Config Files
Open and edit any config file inside the dotfiles repo. For example:
nvim ~/dotfiles/zsh/.zshrc
-
Check the Changes
cd ~/dotfiles git status
-
Stage and Commit
git add zsh/.zshrc git commit -m "Update .zshrc with new aliases"
-
Push to GitHub
git push origin main
Replace
main
with your branch name if different.
If you want to remove symlinks:
stow -D zsh
This repository excludes sensitive or junk files. Here's a recommended .gitignore
:
.cache/
.zsh_history
.zcompdump*
.Trash/
.DS_Store
.viminfo
.lesshst
dotfiles/
├── zsh/
│ ├── .zshrc
│ ├── .zprofile
│ └── .p10k.zsh
├── git/
│ └── .gitconfig
├── tmux/
│ └── .tmux.conf
├── nvim/
│ └── .config/
│ └── nvim/
- Add a
bootstrap.sh
script to automate setup - Install
oh-my-zsh
via script - Add configs for other tools like
starship
,bat
,htop
, etc.
This setup is personal, but feel free to fork and adapt it to your own needs!