Skip to content

bclews/dotfiles

Repository files navigation

Dotfiles

This repository contains my dotfiles, making it easier to manage and version-control them across different systems. It is organised for use with GNU Stow, a symlink manager. The blog post Using GNU Stow to manage your dotfiles does an excellent of job explaining this approach.

Structure

The structure of this repository is:

  1. Each top-level directory is a package: These directories correspond to individual applications or sets of related configuration files.
  2. Subdirectories mimic the target directory structure: Inside each package, the directory structure should match where the files will be placed on the target system.

The table below shows how GNU Stow maps dotfiles to their corresponding locations in the GNU Stow directory structure. The arrows indicate the transformation from the original dotfile location to the GNU Stow convention.

Dotfile GNU Stow Path
~/.config/nvim nvim/.config/nvim
~/.config/alacritty alacritty/.config/alacritty
~/.zshrc zsh/.zshrc

Prerequisites

Ensure you have GNU Stow installed. You can install it via Homebrew on macOS:

brew install stow

Installation

  1. Clone the repository to your home directory:
git clone [email protected]:bclews/dotfiles.git ~/dotfiles
  1. Navigate to the dotfiles directory:
cd ~/dotfiles
  1. Use GNU Stow to create symlinks for the desired configuration packages. For example:
stow alacritty
stow bat
stow btop
stow neofetch
stow nvim

This will create symlinks in the appropriate locations (e.g., ~/.config/alacritty).

Makefile

A Makefile is provided for convenience. You can use it to stow and unstow all configurations at once.

Usage

  • Stow all configurations:
make stow
  • Unstow all configurations:
make unstow
  • Show help message:
make help

Adding New Configurations

To add a new configuration:

  1. Create a new directory for the application inside the dotfiles directory.
  2. Add the configuration files, ensuring the directory structure matches the target location.
  3. Use stow to create symlinks for the new configuration.

About

Configuration files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published