# siduck/chadwm architecture

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

- Interactive diagram: https://gitdiagram.com/siduck/chadwm
- Repository: https://github.com/siduck/chadwm

## Overview

##### Main Components Identification

The system consists of three major components:
- chadwm (Core Window Manager)
- eww (Widget System)
- rofi (Application Launcher)
- Supporting Scripts

##### Component Relationships

- eww Widgets      |

- Dashboard    |  |
- System Stats |  |

- ↕

- Theme Management    |

- Style Config  |  |

- ↕

- chadwm Core       |

- Window Manager |  |
- Layout Engine  |  |
- Event Handling |  |

##### Additional Notes

- Version information and patch list
- External dependency requirements
- Configuration points
- Customization interfaces

- The modular nature of the window manager
- Theme integration across components
- Widget system interaction
- Script-based automation and control
- Patch integration points

Remember to maintain a balance between detail and clarity, focusing on the architectural relationships while avoiding overwhelming technical minutiae.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and Classes
    classDef core fill:#2b4c7d,stroke:#1a2f4d,color:white
    classDef widget fill:#4a9e5a,stroke:#2d5f36,color:white
    classDef theme fill:#8a4ca6,stroke:#532963,color:white
    classDef script fill:#d68c3f,stroke:#8f5c29,color:white
    classDef config fill:#666666,stroke:#333333,color:white
    
    %% Core Window Manager Layer
    subgraph CoreLayer["Core Window Manager"]
        WMEngine["Window Management Engine"]:::core
        DrawUtils["Drawing Utilities"]:::core
        LayoutMods["Layout Modules"]:::core
        Utils["Utility Functions"]:::core
        
        WMEngine --> DrawUtils
        WMEngine --> LayoutMods
        WMEngine --> Utils
    end
    
    %% Theme Management Layer
    subgraph ThemeLayer["Theme Management"]
        WMThemes["Window Manager Themes"]:::theme
        WidgetThemes["Widget Themes"]:::theme
        RofiThemes["Rofi Themes"]:::theme
        BarThemes["Bar Themes"]:::theme
    end
    
    %% Widget System Layer
    subgraph WidgetLayer["Widget System (eww)"]
        Dashboard["Dashboard"]:::widget
        HeaderComps["Header Components"]:::widget
        FooterComps["Footer Components"]:::widget
        AudioControls["Audio Controls"]:::widget
        Styling["Widget Styling"]:::widget
    end
    
    %% Scripts Layer
    subgraph ScriptLayer["System Scripts"]
        BarScript["Bar Script"]:::script
        RunScript["Run Script"]:::script
        SysMonitor["System Monitoring"]:::script
        AudioScript["Audio Control Scripts"]:::script
    end
    
    %% Configuration Layer
    subgraph ConfigLayer["Configuration"]
        WMConfig["Window Manager Config"]:::config
        BuildConfig["Build Configuration"]:::config
        RofiConfig["Rofi Configuration"]:::config
    end
    
    %% Relationships
    WMThemes --> WMEngine
    WidgetThemes --> Dashboard
    RofiThemes --> RofiConfig
    BarThemes --> BarScript
    
    Dashboard --> AudioControls
    HeaderComps --> Dashboard
    FooterComps --> Dashboard
    
    BarScript --> WMEngine
    RunScript --> WMEngine
    AudioScript --> AudioControls
    SysMonitor --> Dashboard
    
    WMConfig --> WMEngine
    BuildConfig --> WMEngine
    
    %% Click Events
    click WMEngine "https://github.com/siduck/chadwm/blob/main/chadwm/dwm.c"
    click DrawUtils "https://github.com/siduck/chadwm/blob/main/chadwm/drw.c"
    click Utils "https://github.com/siduck/chadwm/blob/main/chadwm/util.c"
    click WMThemes "https://github.com/siduck/chadwm/tree/main/chadwm/themes"
    click WidgetThemes "https://github.com/siduck/chadwm/tree/main/eww/scss/themes"
    click RofiThemes "https://github.com/siduck/chadwm/tree/main/rofi/themes"
    click BarThemes "https://github.com/siduck/chadwm/tree/main/scripts/bar_themes"
    click Dashboard "https://github.com/siduck/chadwm/blob/main/eww/src/dashboard.yuck"
    click HeaderComps "https://github.com/siduck/chadwm/tree/main/eww/src/header"
    click FooterComps "https://github.com/siduck/chadwm/tree/main/eww/src/footer"
    click AudioControls "https://github.com/siduck/chadwm/blob/main/eww/src/focal/audioSliders.yuck"
    click Styling "https://github.com/siduck/chadwm/blob/main/eww/eww.scss"
    click BarScript "https://github.com/siduck/chadwm/blob/main/scripts/bar.sh"
    click RunScript "https://github.com/siduck/chadwm/blob/main/scripts/run.sh"
    click SysMonitor "https://github.com/siduck/chadwm/tree/main/eww/scripts/system"
    click AudioScript "https://github.com/siduck/chadwm/tree/main/eww/scripts/audio"
    click WMConfig "https://github.com/siduck/chadwm/blob/main/chadwm/config.def.h"
    click BuildConfig "https://github.com/siduck/chadwm/blob/main/chadwm/config.mk"
    click RofiConfig "https://github.com/siduck/chadwm/blob/main/rofi/config.rasi"
    click LayoutMods "https://github.com/siduck/chadwm/blob/main/chadwm/fibonacci.c"
```
