# dhruvmistry2000/mylinux architecture

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

- Interactive diagram: https://gitdiagram.com/dhruvmistry2000/mylinux
- Repository: https://github.com/dhruvmistry2000/mylinux

## Overview

##### Main Components
- Setup & Installer: Represented by the setup.sh script and the centralized installation command (using curl piped to bash). This component is responsible for bootstrapping the installation process, verifying dependencies, and invoking configuration scripts.
- Configuration Manager: This includes the “config” directory, which holds configuration files for various applications and tools (bspwm, sxhkd, polybar, rofi, kitty, dunst, thunar, etc.).
- Scripts & Automation: The “scripts” directory with files like theme.sh and wallpaper.sh; these are utility scripts that customize the look and behavior of the environment.
- CI/CD Integration: Files under the .github directory (especially the workflows) indicate automated testing or deployment for the project repository.
- Custom Shortcuts & User Interactions: Configurations for sxhkd (in config/sxhkd/sxhkdrc) define custom keyboard shortcuts for launching terminal, file manager, browser, etc., which are central to user experience.
- Documentation & Metadata: The README and other related configuration files (like config.jsonc) provide context and instructions to guide the installation and customization.

##### Establish Relationships & Interactions
- The Scripts & Automation component is used both at installation time and can be used later to modify themes or wallpapers interactively.

##### Architectural Patterns & Design Principles
- Modularity: The configuration files are separated into dedicated directories per application. This implies a modular design where each component (window manager, bar, launcher, etc.) can be updated or modified independently.
- Automation & Idempotence: The setup scripts and CI/CD configuration suggest a design that aims for seamless and repeatable environment setups.
- Compatibility & Flexibility: Support for different Linux distributions is indicated by multiple package manager support.

##### Detail the Interconnections
- That the setup script (setup.sh) acts as the entry point.
- Out UI elements (custom shortcuts from sxhkd) linking to the applications (kitty, thunar, etc.), thereby rendering user action flows.
- Incorporate the CI/CD component (.github/workflows) as a maintenance and update process, indicating how changes can be automatically tested and deployed.

## Diagram (Mermaid)

```mermaid
graph TD

    %% Installer Module
    subgraph "Installer Module"
        INS["Setup & Installer (setup.sh)"]:::installer
    end

    %% Configuration Manager
    subgraph "Configuration Manager"
        CONF["Configuration Manager (config/)"]:::config
        BSP["bspwm Config"]:::config
        POLY["polybar Config"]:::config
        ROFI["rofi Config"]:::config
        KITTY["kitty Config"]:::config
        DUN["dunst Config"]:::config
        SXHKD["sxhkd Shortcuts"]:::config
        THUNAR["Thunar Config"]:::config
    end

    %% Scripts & Automation
    subgraph "Scripts & Automation"
        SCR["Scripts & Automation (scripts/)"]:::scripts
        THEME["Theme Script"]:::scripts
        WALL["Wallpaper Script"]:::scripts
    end

    %% CI/CD Integration
    subgraph "CI/CD Integration"
        CICD["CI/CD Integration (.github/workflows/main.yml)"]:::cicd
    end

    %% Documentation & Metadata
    subgraph "Documentation"
        READ["README.md"]:::docs
        META["Metadata (config.jsonc)"]:::docs
    end

    %% External Dependencies
    subgraph "External Dependencies"
        EXT_PM["Package Manager"]:::external
        EXT_CURL["Internet (curl)"]:::external
    end

    %% Connections between modules
    INS -->|"triggers"| SCR
    INS -->|"loads"| CONF
    INS -->|"installs"| EXT_PM
    INS -->|"downloads"| EXT_CURL
    CICD -->|"tests"| INS
    SCR -->|"runs"| THEME
    SCR -->|"runs"| WALL
    READ -->|"guides"| INS

    %% Connections within Configuration Manager
    CONF -->|"configures"| BSP
    CONF -->|"configures"| POLY
    CONF -->|"configures"| ROFI
    CONF -->|"configures"| KITTY
    CONF -->|"configures"| DUN
    CONF -->|"configures"| SXHKD
    CONF -->|"configures"| THUNAR

    %% Custom Shortcut flows
    SXHKD -->|"launches"| KITTY
    SXHKD -->|"launches"| THUNAR
    SXHKD -->|"launches"| ROFI

    %% Styling Classes
    classDef installer fill:#FCE38A,stroke:#333,stroke-width:2px;
    classDef config fill:#A8D5BA,stroke:#333,stroke-width:2px;
    classDef scripts fill:#F67280,stroke:#333,stroke-width:2px;
    classDef cicd fill:#C06C84,stroke:#333,stroke-width:2px;
    classDef docs fill:#D3D3D3,stroke:#333,stroke-width:2px;
    classDef external fill:#B8E0D2,stroke:#333,stroke-width:2px;

    %% Click Events
    click INS "https://github.com/dhruvmistry2000/mylinux/blob/main/setup.sh"
    click CONF "https://github.com/dhruvmistry2000/mylinux/tree/main/config/"
    click BSP "https://github.com/dhruvmistry2000/mylinux/tree/main/config/bspwm"
    click POLY "https://github.com/dhruvmistry2000/mylinux/tree/main/config/polybar"
    click ROFI "https://github.com/dhruvmistry2000/mylinux/tree/main/config/rofi"
    click KITTY "https://github.com/dhruvmistry2000/mylinux/tree/main/config/kitty"
    click DUN "https://github.com/dhruvmistry2000/mylinux/tree/main/config/dunst"
    click SXHKD "https://github.com/dhruvmistry2000/mylinux/tree/main/config/sxhkd/sxhkdrc"
    click THUNAR "https://github.com/dhruvmistry2000/mylinux/tree/main/config/Thunar"
    click SCR "https://github.com/dhruvmistry2000/mylinux/tree/main/scripts/"
    click THEME "https://github.com/dhruvmistry2000/mylinux/blob/main/scripts/theme.sh"
    click WALL "https://github.com/dhruvmistry2000/mylinux/blob/main/scripts/wallpaper.sh"
    click CICD "https://github.com/dhruvmistry2000/mylinux/blob/main/.github/workflows/main.yml"
    click READ "https://github.com/dhruvmistry2000/mylinux/blob/main/README.md"
    click META "https://github.com/dhruvmistry2000/mylinux/blob/main/config.jsonc"
```
