How tanisukegoro/dotfiles works
Main Components
• Core Build/Installation Engine: Represent the top-level Makefile and scripts (in src/make) that drive the installation and cleaning routines.
• Modules Directory: Each subdirectory under “modules” (aerospace, bottom, code, editline, editorconfig, fish, gem, git, nvim, readline, starship, tig, tmux, vim, vimium) is a discrete configuration unit or “module”. They contain configuration files, tool-specific Makefiles, and sometimes additional metadata (like .toml files or JSON settings) that specify custom setups.
• Tool-Specific Components:
– Neovim: “modules/nvim” with init.vim and plugins.
– Fish Shell: “modules/fish” with its configuration (functions, completions, conf.d, etc.).
– Tmux: “modules/tmux” containing tmux configuration and README.
– Homebrew Backup: “config/homebrew” holds the Brewfile and other details.
– Others: git, vim, and additional tools with their respective configurations.
• External Dependencies/Services:
– Homebrew is used for package management with backup scripts.
– Plugin managers like coc.nvim for nvim are triggered post-installation.
Relationships and Data Flow
• The central Makefile (and its subsidiary scripts) functions as the controller that triggers installation, update, and cleanup processes.
• Each tool-specific module is invoked via its associated Makefile (e.g., “make nvim-install”, “make fish-install”, “make tmux-install”) which encapsulates the commands to deploy configurations.
• There is an “installation pipeline”: when a make command is executed, it reads from the module’s configuration files (such as keybindings, shell functions, and plugin settings) and applies them to the user’s environment.
• Homebrew commands (like “brew bundle” and “brew bundle dump”) interact with external package management, ensuring that dependencies are installed or backed up.
Important Architectural Patterns and Design Principles
• Modularity: The repository is broken down into small, self-contained modules, each responsible for a particular tool or configuration.
• Separation of Concerns: The configuration for each tool (nvim, fish, tmux, etc.) is neatly segregated into its own directory, making updates and extensions straightforward.
• Automation: The use of Makefiles across modules emphasizes automation of repetitive tasks like install, clean, and update.
• Declarative Configurations: Using files like .toml, JSON, and plain text configuration allows declarative management of settings.