# jakoolit/arch-hyprland architecture

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

- Interactive diagram: https://gitdiagram.com/jakoolit/arch-hyprland
- Repository: https://github.com/jakoolit/arch-hyprland

## Overview

##### Main Components
- Install Entry Points – Represent the primary scripts such as install.sh, auto-install.sh, and uninstall.sh. These serve as the “controller” initiating the installation or removal process.
- Script Modules (install-scripts) – This directory contains many small, purpose-specific scripts (e.g., 00-base.sh, 01-hypr-pkgs.sh, nvidia.sh, pipewire.sh, etc.). These modular scripts are called by the entry point scripts based on user choices and system properties.
- Assets Directory – Encompasses configuration files and resources (like zsh themes, Thunar file manager configurations, fastfetch configs, and GTK/SDDM theme files). They are used for theming, customization, and applying specific user configurations.
- Helper/Utility Functions – Included scripts like Global_functions.sh which provide common functionality across the install-scripts.

##### Relationships and Interactions
- If applicable, include decision points (like conditional checks for Nvidia vs. Nouveau, or choice between graphical login managers), which may lead to different script execution paths (this can be represented using diamonds or annotated conditional branches).

##### Architectural Patterns and Design Principles
- Modularity – Emphasize that the project is built with reusable and independent install-scripts. Each script handles a single responsibility, which makes the architecture highly modular.
- Sequential and Conditional Flow – The main installer acts as a coordinator, launching different scripts in sequence as well as branching based on system checks (e.g., installing pipewire while disabling pulseaudio).

## Diagram (Mermaid)

```mermaid
graph TD
    %% Entry Points
    subgraph "Entry Points"
        EP1["install.sh (Entry Point)"]:::entry
        EP2["auto-install.sh (Entry Point)"]:::entry
        EP3["uninstall.sh (Entry Point)"]:::entry
    end

    %% Installer Modules
    subgraph "Installer Modules"
        M00["00-base.sh"]:::module
        M01["01-hypr-pkgs.sh"]:::module
        D["GPU_Detected?"]:::decision
        M_nvidia["nvidia.sh"]:::module
        M_hypr["hyprland.sh"]:::module
        M_pipewire["pipewire.sh"]:::module
        U["Global_functions.sh (Helper)"]:::module
    end

    %% Resources & External Dependencies
    subgraph "Resources"
        A["Assets (Configurations & Resources)"]:::assets
        E["Hyprland-Dots (External Repo)"]:::external
    end

    %% Flow Connections
    EP1 -->|"starter"| M00
    EP2 -->|"starter"| M00
    %% Uninstall is separate and not part of installation flow
    M00 -->|"calls"| M01
    M01 -->|"GPU_check"| D
    D -- "yes" --> M_nvidia
    D -- "no" --> M_hypr
    M_nvidia -->|"continues"| M_hypr
    M_hypr -->|"calls"| M_pipewire
    %% Indicate usage of helper functions (dotted)
    M00 ---|"uses"| U
    M01 ---|"uses"| U
    M_nvidia ---|"uses"| U
    M_hypr ---|"uses"| U
    M_pipewire ---|"uses"| U
    %% Assets provide configurations to installation process
    A -->|"apply_config"| M00
    %% External dotfiles dependency is fetched during installation
    M00 -->|"fetch_dotfiles"| E

    %% Styles
    classDef entry fill:#add8e6,stroke:#000,stroke-width:2px;
    classDef module fill:#90ee90,stroke:#000,stroke-width:2px;
    classDef assets fill:#ffcc80,stroke:#000,stroke-width:2px;
    classDef external fill:#f08080,stroke:#000,stroke-width:2px;
    classDef decision fill:#ffff99,stroke:#000,stroke-width:2px,stroke-dasharray: 5, 5;

    %% Click Events for Entry Points
    click EP1 "https://github.com/jakoolit/arch-hyprland/blob/main/install.sh"
    click EP2 "https://github.com/jakoolit/arch-hyprland/blob/main/auto-install.sh"
    click EP3 "https://github.com/jakoolit/arch-hyprland/blob/main/uninstall.sh"

    %% Click Events for Installer Modules
    click M00 "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/00-base.sh"
    click M01 "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/01-hypr-pkgs.sh"
    click M_nvidia "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/nvidia.sh"
    click M_hypr "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/hyprland.sh"
    click M_pipewire "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/pipewire.sh"
    click U "https://github.com/jakoolit/arch-hyprland/blob/main/install-scripts/Global_functions.sh"

    %% Click Event for Assets Directory
    click A "https://github.com/jakoolit/arch-hyprland/tree/main/assets"
```
