# embercraze/dotfiles architecture

> Architecture diagram of the GitHub repository embercraze/dotfiles, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/embercraze/dotfiles
- Repository: https://github.com/embercraze/dotfiles

## Overview

##### Main Components Identification
- Configuration Directories: Split these into major categories such as
- Terminal emulator configurations (e.g., “kitty”, “alacritty” in files/.config/kitty and files/.config/alacritty).
- Window manager and status bar configurations (e.g., “i3”, “i3status-rust”).
- Shell settings (e.g., “zsh” directory along with .zshrc, .zimrc, etc.).
- Other application configurations like “nvim”, “git”, “ranger”, “redshift”, “tmux”, and additional files under “files”.
- Scripts and Installers: The “installer.sh”, the Makefile, and the “scripts” folder show how configurations are deployed/updated.
- Assets and External Themes: For example, themes for alacritty (with many TOML theme files), as well as associated assets like images or licenses.

##### Relationships and Interactions
- The installer scripts and Makefile orchestrate the linking (likely using stow or symbolic links) of dotfiles from the repository to the user’s home directory.
- Each configuration folder (e.g., “.config/kitty”, “.config/i3”, “zsh”, etc.) represents settings for a specific application.
- Recognize that some directories might have hierarchical dependencies – for instance, “files/.config/alacritty” includes a subfolder for “alacritty-theme” which itself segments into different themes.

##### Architectural Patterns and Design Principles
- Modular Configuration: The dotfiles are organized modularly – each piece of software has its own directory. This design pattern supports both ease of maintenance and reuse.
- Symlink-based Deployment: Although not explicitly depicted in the files, the structure suggests the use of symlinks (managed by GNU stow or similar) to deploy these configurations. The Makefile might automate this process.

##### Relevant Technologies, Frameworks, or Libraries
- GNU stow or similar tooling for managing symbolic links.
- Shell scripting (bash/zsh) used in files like “installer.sh” and in the “scripts” directory.
- Configuration formats: TOML (for alacritty themes), YAML (in colorls, rofi) and standard config file formats used by applications.

##### Important Reminders
- Detail is key: Although dotfiles might seem simple, capturing the nuanced organization (subfolders for themes; scripts for status monitoring and system updates) is very helpful.

## Diagram (Mermaid)

```mermaid
graph TD
  %% Central Deployment Controller
  CD["Deployment Controller"]:::deployment

  %% Deployment Scripts Cluster
  subgraph "Deployment/Installer Scripts"
    DS1["installer.sh"]:::deployment
    DS2["Makefile"]:::deployment
    DS3["Scripts"]:::deployment
  end

  %% Terminal Emulator Configurations
  subgraph "Terminal Emulator Configurations"
    KT["Kitty Terminal – Config"]:::terminal
    KCF["Kitty Config (config & kitty.conf)"]:::terminal
    AT["Alacritty Terminal – Config"]:::terminal
    AConfig["alacritty.toml"]:::terminal
    ATT["Alacritty Themes"]:::terminal
  end

  %% Window Manager Configurations
  subgraph "Window Manager Configurations"
    I3["i3 – Config"]:::window
    I3S["i3 Scripts & Additional Configs"]:::window
    I3SR["i3status-rust – Config"]:::window
  end

  %% Shell and CLI Tools
  subgraph "Shell & CLI Tools"
    Zsh["zsh – Config"]:::shell
    Fish["fish – Config"]:::shell
  end

  %% Editor and Miscellaneous Configurations
  subgraph "Editor & Miscellaneous Configurations"
    NVim["Neovim – Config"]:::editor
    Git["Git – Config"]:::editor
    Ranger["Ranger – Config"]:::editor
    Redshift["Redshift – Config"]:::editor
    Tmux["Tmux – Config"]:::editor
    Vifm["Vifm – Config"]:::editor
  end

  %% Relationships from Deployment Controller to Configurations
  CD -->|"deploys"| KT
  CD -->|"deploys"| AT
  CD -->|"deploys"| I3
  CD -->|"deploys"| I3SR
  CD -->|"deploys"| Zsh
  CD -->|"deploys"| Fish
  CD -->|"deploys"| NVim
  CD -->|"deploys"| Git
  CD -->|"deploys"| Ranger
  CD -->|"deploys"| Redshift
  CD -->|"deploys"| Tmux
  CD -->|"deploys"| Vifm

  %% Link Deployment Controller with Deployment Scripts details
  CD -->|"orchestrates"| DS1
  CD -->|"orchestrates"| DS2
  CD -->|"orchestrates"| DS3

  %% Internal connections within Terminal Configurations
  KT -->|"includes"| KCF
  AT -->|"includes"| AConfig
  AT -->|"selects"| ATT

  %% Internal connection within Window Manager Configurations
  I3 -->|"has"| I3S

  %% Styles
  classDef deployment fill:#ADD8E6,stroke:#000,stroke-width:1px;
  classDef terminal fill:#FFC0CB,stroke:#000,stroke-width:1px;
  classDef window fill:#90EE90,stroke:#000,stroke-width:1px;
  classDef shell fill:#FFFFE0,stroke:#000,stroke-width:1px;
  classDef editor fill:#FFA07A,stroke:#000,stroke-width:1px;

  %% Click Events for Terminal Emulator Configurations
  click KT "https://github.com/embercraze/dotfiles/tree/master/files/.config/kitty"
  click KCF "https://github.com/embercraze/dotfiles/tree/master/files/.config/kitty/config"
  click AT "https://github.com/embercraze/dotfiles/tree/master/files/.config/alacritty"
  click AConfig "https://github.com/embercraze/dotfiles/blob/master/files/.config/alacritty/alacritty.toml"
  click ATT "https://github.com/embercraze/dotfiles/tree/master/files/.config/alacritty/alacritty-theme"

  %% Click Events for Window Manager Configurations
  click I3 "https://github.com/embercraze/dotfiles/tree/master/files/.config/i3"
  click I3S "https://github.com/embercraze/dotfiles/tree/master/files/.config/i3/scripts"
  click I3SR "https://github.com/embercraze/dotfiles/tree/master/files/.config/i3status-rust"

  %% Click Events for Shell and CLI Tools
  click Zsh "https://github.com/embercraze/dotfiles/tree/master/zsh"
  click Fish "https://github.com/embercraze/dotfiles/tree/master/files/.config/fish"

  %% Click Events for Editor and Miscellaneous Configurations
  click NVim "https://github.com/embercraze/dotfiles/tree/master/files/.config/nvim"
  click Git "https://github.com/embercraze/dotfiles/tree/master/files/.config/git"
  click Ranger "https://github.com/embercraze/dotfiles/tree/master/files/.config/ranger"
  click Redshift "https://github.com/embercraze/dotfiles/tree/master/files/.config/redshift"
  click Tmux "https://github.com/embercraze/dotfiles/tree/master/files/.config/tmux"
  click Vifm "https://github.com/embercraze/dotfiles/tree/master/files/.config/vifm"

  %% Click Events for Deployment/Installer Scripts
  click DS1 "https://github.com/embercraze/dotfiles/blob/master/installer.sh"
  click DS2 "https://github.com/embercraze/dotfiles/tree/master/Makefile"
  click DS3 "https://github.com/embercraze/dotfiles/tree/master/scripts"
```
