# dev-math/dotfiles architecture

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

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

## Overview

##### Core Components (Main Layer)
- Use a central hub representing "chezmoi" as the configuration manager
- Create distinct zones for different configuration domains

##### Configuration Domains (Second Layer)
a) Window Management System (Sway)
b) Shell Environment (Zsh)
c) Development Environment (Neovim)
d) System Utilities
e) Theme Management (Pywal)

##### Central Management (Core)
- Template Engine (.tmpl files)
- Script Execution System (chezmoiscripts)

a) System Interface:
- Sway (Window Manager)
- Rofi (Application Launcher)
- Dunst (Notifications)
- Status Bar (i3status-rust)

b) Development Environment:
- Neovim Configuration
- LSP Servers
- Plugin Management
- Git Configuration

c) Terminal Environment:
- Zsh Configuration
- Tmux Setup
- Shell Scripts
- Aliases and Functions

d) Theming System:
- Pywal
- Templates
- Application Theming

Use these specific visualization guidelines:

##### Component Representations
- Rectangles: Configuration files
- Hexagons: Core services
- Circles: Scripts and executables
- Rounded rectangles: Applications

##### The script execution workflow for system setup

Keep the abstraction level focused on the configuration management aspects while showing the relationships between different system components. This will help understand both the static structure and the dynamic configuration process.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Management"]
        Chezmoi[("Chezmoi Controller")]:::core
        TemplateEngine["Template Engine"]:::core
        ScriptExec["Script Execution"]:::core
    end

    subgraph SysInterface["System Interface"]
        Sway["Sway WM"]:::ui
        Rofi["Application Launcher"]:::ui
        Dunst["Notifications"]:::ui
        StatusBar["i3status-rust"]:::ui
    end

    subgraph DevEnv["Development Environment"]
        Neovim["Neovim"]:::dev
        LSP["LSP Servers"]:::dev
        Plugins["Plugin Management"]:::dev
        Git["Git Config"]:::dev
    end

    subgraph Terminal["Terminal Environment"]
        Zsh["Zsh Shell"]:::term
        Tmux["Tmux"]:::term
        Scripts["Shell Scripts"]:::term
        Aliases["Aliases & Functions"]:::term
    end

    subgraph Theme["Theming System"]
        Pywal["Pywal"]:::theme
        Templates["Theme Templates"]:::theme
        Colors["Color Schemes"]:::theme
        AppTheme["Application Theming"]:::theme
    end

    subgraph Utils["System Utilities"]
        Display["Display Management"]:::util
        Lock["Screen Locking"]:::util
        SSH["SSH Config"]:::util
    end

    %% Core Relationships
    Chezmoi --> TemplateEngine
    Chezmoi --> ScriptExec
    
    %% Template Engine Relationships
    TemplateEngine -.-> Dunst
    TemplateEngine -.-> Git
    TemplateEngine -.-> AppTheme

    %% Pywal Integration
    Pywal --> Templates
    Templates --> Colors
    Colors --> AppTheme
    AppTheme --> Dunst
    AppTheme --> Terminal

    %% System Interface Dependencies
    Sway --> StatusBar
    Sway --> Rofi
    Sway --> Dunst

    %% Core to Component Relationships
    Chezmoi --> SysInterface
    Chezmoi --> DevEnv
    Chezmoi --> Terminal
    Chezmoi --> Theme
    Chezmoi --> Utils

    %% Click Events
    click Chezmoi "https://github.com/dev-math/dotfiles/blob/main//.chezmoi.toml.tmpl"
    click ScriptExec "https://github.com/dev-math/dotfiles/tree/main//.chezmoiscripts/"
    click Sway "https://github.com/dev-math/dotfiles/tree/main//dot_config/sway/config"
    click Dunst "https://github.com/dev-math/dotfiles/blob/main//dot_config/dunst/symlink_dunstrc.tmpl"
    click StatusBar "https://github.com/dev-math/dotfiles/blob/main//dot_config/i3status-rust/config.toml"
    click Neovim "https://github.com/dev-math/dotfiles/blob/main//dot_config/nvim/init.lua"
    click LSP "https://github.com/dev-math/dotfiles/tree/main//dot_config/nvim/lua/lsp_servers/"
    click Plugins "https://github.com/dev-math/dotfiles/tree/main//dot_config/nvim/lua/plugins/"
    click Git "https://github.com/dev-math/dotfiles/blob/main//dot_gitconfig.tmpl"
    click Zsh "https://github.com/dev-math/dotfiles/tree/main//dot_config/zsh/dot_zshrc"
    click Tmux "https://github.com/dev-math/dotfiles/blob/main//dot_config/tmux/tmux.conf"
    click Aliases "https://github.com/dev-math/dotfiles/tree/main//dot_config/zsh/aliases"
    click Templates "https://github.com/dev-math/dotfiles/tree/main//dot_config/wal/templates/"
    click Colors "https://github.com/dev-math/dotfiles/blob/main//dot_config/wal/templates/colors.sh"
    click Display "https://github.com/dev-math/dotfiles/blob/main//dot_local/bin/executable_manage-displays.bash"
    click Lock "https://github.com/dev-math/dotfiles/blob/main//dot_local/bin/executable_lockscreen.tmpl"
    click SSH "https://github.com/dev-math/dotfiles/tree/main//private_dot_ssh/"

    %% Styling
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef ui fill:#e67e22,stroke:#d35400,color:white
    classDef dev fill:#2ecc71,stroke:#27ae60,color:white
    classDef term fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef theme fill:#9b59b6,stroke:#8e44ad,color:white
    classDef util fill:#bdc3c7,stroke:#95a5a6,color:white
```
