Skip to content

Latest commit

Β 

History

History
108 lines (71 loc) Β· 3.22 KB

File metadata and controls

108 lines (71 loc) Β· 3.22 KB

Dotfiles!

This repository contains a managed collection of dotfiles and configuration files for macOS, organized with GNU Stow. The goal is to keep everything modular, reproducible, and easy to set up on a new machine.


πŸ“‚ Repository Structure

Each top-level directory in this repo is a stow package. Inside each package, the directory structure mirrors the layout of $HOME.

For example:

dotfiles/ bin/ β†’ contains local bin scripts ghostty/ β†’ contains .config/ghostty/ goose/ β†’ contains .config/goose/ nvim/ β†’ contains .config/nvim/ opencode/ β†’ contains .config/opencode/ sketchybar/ β†’ contains .config/sketchybar/ skhd/ β†’ contains .skhdrc starship/ β†’ contains .config/starship/ tmux/ β†’ contains .config/tmux/ yabai/ β†’ contains .config/yabai/ yazi/ β†’ contains .config/yazi/ zshrc/ β†’ contains .zshrc

This means:

  • Running stow zshrc will symlink .zshrc into ~/.zshrc.
  • Running stow nvim will symlink .config/nvim into ~/.config/nvim.

⚑ Installation

Clone the repo into ~/repos/dotfiles (or your preferred location):

git clone https://github.com/<your-username>/dotfiles.git ~/repos/dotfiles
cd ~/repos/dotfiles

Then run the install script to stow all packages:

./install.sh

This will symlink everything into the correct locations under $HOME.

─────────────────────────────────────────

πŸ”§ Managing Packages

β€’ Stow a package stow -t ~ nvim This creates symlinks from dotfiles/nvim/.config/nvim/ into ~/.config/nvim/. β€’ Unstow a package stow -D nvim This removes the symlinks created by stow. β€’ Restow (update symlinks) stow -R nvim

─────────────────────────────────────────

πŸ‘€ Checking Existing Symlinks

Stow doesn’t keep a registry of what’s installed β€” it just creates symlinks. To see what’s currently linked:

ls -l ~ | grep '->' ls -l ~/.config | grep '->'

This shows which files and directories are symlinked and where they point.

─────────────────────────────────────────

πŸ“œ install.sh

The included script automates stowing all packages:

#!/usr/bin/env bash

install.sh - symlink all dotfiles with stow

DOTFILES_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$DOTFILES_DIR"

PACKAGES=( bin ghostty goose nvim opencode sketchybar skhd starship tmux yabai yazi zshrc )

for pkg in "${PACKAGES[@]}"; do stow -R -t "$HOME" "$pkg" done

Run it once after cloning to set up your environment.

─────────────────────────────────────────

πŸ›  Best Practices

β€’ Keep one package per app/tool for modularity. β€’ Mirror the exact structure of $HOME inside each package. β€’ Use stow -D to cleanly remove symlinks. β€’ Use stow -R to refresh symlinks after making changes.

─────────────────────────────────────────