Personal dotfiles managed with GNU Stow for easy synchronization across multiple machines.
This repository contains configuration files (dotfiles) for various tools and applications. Using GNU Stow, these dotfiles can be easily installed and managed through symbolic links.
- Git
- GNU Stow
Ubuntu/Debian:
sudo apt-get install stowmacOS:
brew install stowArch Linux:
sudo pacman -S stowEach directory represents a "package" that can be independently installed:
dotfiles/
├── bash/ # Bash configuration (.bashrc, .bash_profile)
├── git/ # Git configuration (.gitconfig)
├── vim/ # Vim configuration (.vimrc)
├── zsh/ # Zsh configuration (.zshrc)
├── tmux/ # Tmux configuration (.tmux.conf)
└── install.sh # Installation script
Each package contains files organized as they would appear in your home directory. For example:
bash/.bashrcwill be linked to~/.bashrcgit/.gitconfigwill be linked to~/.gitconfig
First, clone this repository to your home directory or any preferred location. By default the
configuration files expect to live in ~/.dotfiles, but you can override that by exporting a
DOTFILES environment variable that points to the repository.
git clone https://github.com/zoro11031/dotfiles.git ~/.dotfiles
cd ~/.dotfilesIf you would rather keep the repository elsewhere, set the environment variable accordingly before running the scripts. For example:
export DOTFILES="$HOME/my-dotfiles"
cd "$DOTFILES"To install all dotfiles at once:
./install.shTo install only specific packages:
./install.sh bash git vimYou can also manually install packages using stow:
cd "$DOTFILES"
stow bash # Install bash configuration
stow git # Install git configuration
stow vim # Install vim configurationTo uninstall packages, use the uninstall flag:
./install.sh --uninstall bash gitOr manually with stow:
cd "$DOTFILES"
stow -D bash # Remove bash configurationTo update your dotfiles:
-
Pull the latest changes:
cd "$DOTFILES" git pull
-
Reinstall the packages:
./install.sh --reinstall
To add machine-specific customizations without modifying the repository:
- For bash: Create
~/.bashrc.local - For zsh: Create
~/.zshrc.local
These files will be automatically sourced if they exist and are ignored by git.
- Edit the files in the dotfiles repository
- Commit your changes:
git add . git commit -m "Update configuration" git push
- Command history settings
- Colorized prompt
- Common aliases (ll, la, grep)
- Bash completion support
- User configuration (name, email)
- Color output
- Useful aliases (st, co, br, ci, lg)
- Default branch settings
- Syntax highlighting
- Line numbers
- Smart indentation
- Search settings
- No backup files
- Command history
- Colorized prompt
- Completion system
- Common aliases
- Custom prefix (Ctrl-a)
- Mouse support
- Better pane splitting
- Status bar customization
To sync dotfiles across multiple machines:
-
First machine (initial setup):
cd "$DOTFILES" # Make your changes git add . git commit -m "Your changes" git push
-
Other machines (sync):
cd "$DOTFILES" git pull ./install.sh --reinstall
If you have existing dotfiles, stow will warn you about conflicts. You can:
-
Backup your existing files:
mv ~/.bashrc ~/.bashrc.backup
-
Then run the installation again
To see what stow will do without actually doing it:
stow -n -v bash # Dry run with verbose outputThis project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Feel free to fork this repository and customize it for your own use. If you have suggestions for improvements, please open an issue or pull request.