My personal collection of configuration files for a streamlined and productive development environment on Arch Linux. Managed with GNU Stow.
This repository contains my preferred configurations for:
- Alacritty: A fast, cross-platform, OpenGL terminal emulator.
- Git: Global git configuration and ignore file.
- Neovim (nvim): My primary text editor setup (looks like a solid LazyVim based setup).
- tmux: Terminal multiplexer for managing multiple terminal sessions.
- Zsh: My shell of choice, with plugins and aliases.
- Note:
.zshrcis configured to usezsh-autosuggestionsandzsh-syntax-highlighting. You'll need to install these separately (see Prerequisites).
- Note:
- Git: For cloning the repository.
- GNU Stow: For symlinking the dotfiles.
- On Arch Linux, you can install it with:
sudo pacman -S stow
- On Arch Linux, you can install it with:
- The applications you want to configure: (e.g., Alacritty, Neovim, tmux, Zsh).
- Zsh Plugins (if using Zsh config):
zsh-autosuggestionszsh-syntax-highlighting- On Arch Linux, you can install them from the official repositories or AUR:
(Alternatively, you might use a Zsh plugin manager like Oh My Zsh, Antigen, Zinit, etc. Adjust as per your preference.)
sudo pacman -S zsh-autosuggestions zsh-syntax-highlighting
- (Optional but Recommended) A Nerd Font: For proper icon rendering in Neovim and other tools (e.g., Fira Code Nerd Font, JetBrainsMono Nerd Font).
~/.zshrc, ~/.config/nvim, etc.) before proceeding.
-
Install Prerequisites: Ensure
gitandstoware installed. For Arch Linux:sudo pacman -S git stow
If you plan to use the Zsh configuration, install the Zsh plugins:
sudo pacman -S zsh-autosuggestions zsh-syntax-highlighting
-
Clone the repository:
git clone https://github.com/Eduruiz/dotfiles.git ~/.dotfiles(You can clone it to any directory, but
~/.dotfilesis a common convention.) -
Navigate into the cloned directory:
cd ~/.dotfiles
-
Stow the configurations: To symlink all configurations:
stow *Or, to stow specific packages (e.g., just nvim and zsh):
stow nvim zsh
-
Restart your terminal or source your shell configuration (e.g.,
source ~/.zshrc) for changes to take effect. For Neovim, the first launch might install plugins.
GNU Stow is a symlink farm manager. It takes distinct packages of software and symlinks their files into a common directory tree. In our case, the "packages" are directories like nvim, zsh, git, etc., within this .dotfiles repository, and the "common directory tree" is your home directory (~).
All stow commands should be run from within your ~/.dotfiles directory.
Let's say you want to add configuration files for a new application called newapp.
-
Identify the target path: Determine where
newappexpects its configuration files.- Example 1:
~/.newapprc - Example 2:
~/.config/newapp/config.json
- Example 1:
-
Create the corresponding directory structure inside your
~/.dotfilesrepo:- For
~/.newapprc:cd ~/.dotfiles mkdir newapp
- For
~/.config/newapp/config.json:cd ~/.dotfiles mkdir -p newapp/.config/newapp
The
newappdirectory here is your "stow package". The structure insidenewapp/must mirror the structure relative to your home directory. - For
-
Move your existing configuration file(s) into this new structure:
- For
~/.newapprc:Now you'll havemv ~/.newapprc ~/.dotfiles/newapp/
~/.dotfiles/newapp/.newapprc. - For
~/.config/newapp/config.json:Now you'll havemv ~/.config/newapp/config.json ~/.dotfiles/newapp/.config/newapp/
~/.dotfiles/newapp/.config/newapp/config.json. (Alternatively, you can copy them and delete the originals later, or create them from scratch within the.dotfilesstructure.)
- For
-
"Stow" the new package: From your
~/.dotfilesdirectory:stow newapp
This command will create symlinks:
~/.newapprcβ~/.dotfiles/newapp/.newapprc~/.config/newapp/config.jsonβ~/.dotfiles/newapp/.config/newapp/config.json(it will also create~/.config/newappif it doesn't exist, and~/.configif needed)
-
Add, commit, and push the changes to your Git repository:
git add newapp git commit -m "Add configuration for newapp" git push origin main # or your default branch name
- Edit the configuration file directly within your
~/.dotfilesrepository (e.g.,~/.dotfiles/zsh/.zshrc). - The changes are immediate because the file in your home directory (e.g.,
~/.zshrc) is just a symlink to the one in the repository. - Commit and push the changes to Git:
git add zsh/.zshrc # or the specific file you changed git commit -m "Update Zsh configuration" git push origin main
If you manually add files to a stowed package directory (e.g., add a new alias file inside ~/.dotfiles/zsh/aliases/) or if symlinks get broken, you can "restow" the package:
stow --restow zshOr to restow everything:
stow --restow *The --restow option will first "unstow" (remove symlinks) and then "stow" again, ensuring all links are fresh.
Removing a Configuration (Unstowing)
If you no longer want stow to manage a package's configuration:
Unstow the package: From your ~/.dotfiles directory:
stow -D zshThis removes the symlinks managed by stow for the zsh package (e.g., ~/.zshrc will be unlinked). Your actual configuration files remain safe within ~/.dotfiles/zsh/.
(Optional) If you want to remove the configuration from your dotfiles repository entirely:
git rm -r zsh
git commit -m "Remove zsh configuration"
git push origin mainFeel free to fork this repository and customize it to your heart's content!
While these are my personal dotfiles, if you spot an error, a potential improvement, or have a suggestion, feel free to open an issue!
