# gui200428/dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This is a personal “dotfiles” repository whose goal is to centralize and version-control the user’s configuration across multiple machines.
- It contains:
- Shell and utility scripts for bootstrapping (Scripts/arch.sh, backup scripts)
- AGS (Aylur’s GTK Shell) widget configurations (ags/…)
- GTK 3/4 theme settings (gtk-3.0/, gtk-4.0/)
- Hyprland window manager configs (hypr/)
- Neovim configuration (nvim/)
- A record of installed pacman/AUR packages (system-pkgs-bkp/)

##### File structure
- Top level:
- README.md – explains purpose and contents
- Scripts/ – provisioning & backup scripts
- ags/ – TypeScript/React-style widget code and SCSS styling for AGS
- gtk-3.0/ & gtk-4.0/ – theme settings for GTK
- hypr/ – Hyprland WM configuration files
- nvim/ – Neovim setup (Lua, plugin specs, docs)
- system-pkgs-bkp/ – exported lists of installed packages
- Observe clear separation of concerns: “ags” for shell UI, “nvim” for editor, “hypr” for WM, plus generic scripts and theme folders.

##### Key insights from README
- Primary use cases: backup, sync, version control, reference
- Intended to be cloned on a new machine and run setup scripts to reproduce the environment
- External integrations: Git (GitHub), pacman/AUR, AGS, GTK, Hyprland, Neovim

##### Main components
a. Version-Control Layer:
- GitHub (remote origin)
- Local Git clone of the dotfiles repo
b. Bootstrap/Provisioning Layer:
- Scripts/arch.sh – installs packages, creates symlinks, applies configs
- Scripts/backup-arch.sh – exports package lists back into repo
c. Configuration Targets:
- AGS Shell (ags/) → React‐style widgets + SCSS → ~/.config/ags/
- GTK Themes (gtk-3.0/, gtk-4.0/) → ~/.config/gtk-3.0/, ~/.config/gtk-4.0/
- Hyprland (hypr/) → ~/.config/hypr/
- Neovim (nvim/) → ~/.config/nvim/
d. System Package Manager:
- pacman (core packages)
- AUR helper (community/AUR packages)
e. Runtime Environment:
- Linux desktop environment loading GTK themes
- Hyprland spawning AGS and applications
- Neovim reading Lua configs & plugins

##### Relationships and interactions
- Package installation → pacman/AUR
- Symlink/config deployment → ~/.config/<component>
- At runtime: WM (Hyprland) reads hypr/ → launches AGS shell → applies widget code (ags/) + theme (gtk-3.0/4.0/)
- Neovim reads nvim/ on startup

##### Architectural patterns and design principles
- “Infrastructure as Code” / declarative provisioning: configs and scripts live in Git
- Separation of concerns: each major piece (WM, shell, editor, theme) in its own directory
- Idempotency: bootstrap scripts should be re-runnable without side effects

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Remote Origin"
        GH["GitHub (dotfiles.git)"]:::tool
    end

    subgraph "Local Repository"
        Repo["Local Repo"]:::repo
        README["README.md"]:::repo
        Repo --> README

        subgraph "Scripts"
            Arch["Scripts/arch.sh"]:::script
            Backup["Scripts/backup-arch.sh"]:::script
        end

        subgraph "AGS Shell"
            App["app.ts"]:::repo
            PackageJSON["package.json"]:::repo
            TSConfig["tsconfig.json"]:::repo
            subgraph "Style"
                StyleSCSS["style.scss"]:::repo
                VarsSCSS["variables.scss"]:::repo
                BarSCSS["widgets/bar.scss"]:::repo
            end
            Widgets["ags/widgets/..."]:::repo
        end

        subgraph "GTK Themes"
            GTK3["settings.ini (gtk-3.0)"]:::repo
            GTK4["settings.ini (gtk-4.0)"]:::repo
        end

        subgraph "Hyprland Configuration"
            HyprlandConf["hyprland.conf"]:::repo
            Autostart["autostart.conf"]:::repo
            Bindings["bindings.conf"]:::repo
            Input["input.conf"]:::repo
            Monitors["monitors.conf"]:::repo
            Programs["programs.conf"]:::repo
            ThemeConf["theme.conf"]:::repo
            Windows["windows.conf"]:::repo
            Paper["hyprpaper.conf"]:::repo
        end

        subgraph "Neovim Configuration"
            Init["init.lua"]:::repo
            Stylua[".stylua.toml"]:::repo
            Doc["kickstart.txt"]:::repo
            subgraph "Lua Modules"
                LuaCore["lua/core/..."]:::repo
                LuaPlugins["lua/plugins/..."]:::repo
            end
            subgraph "GitHub Actions"
                GHWF[".github/workflows/..."]:::repo
                GHTemp[".github/templates/..."]:::repo
            end
        end

        subgraph "Package Lists"
            Pacman["pacman_pkgs.txt"]:::repo
            AUR["aur_pkgs.txt"]:::repo
        end
    end

    subgraph "System Components"
        PacmanMgr[(pacman & AUR helper)]:::tool
        SystemPkgDb[(System Packages DB)]:::runtime
        ConfigDirs[~/.config/... ]:::runtime
    end

    subgraph "Runtime Environment"
        Hypr[Hyprland WM]:::runtime
        AGS[AGS Shell]:::runtime
        GTK[GTK Themes Loader]:::runtime
        NVIM[Neovim]:::runtime
    end

    GH -->|"git clone/pull"| Repo
    Repo -->|"run arch.sh"| Arch
    Arch -->|"install packages"| PacmanMgr
    PacmanMgr -->|writes to| SystemPkgDb
    Arch -->|"symlink configs"| ConfigDirs
    Backup -->|"exports lists"| Pacman
    Backup -->|"exports lists"| AUR
    Pacman --> Repo
    AUR --> Repo

    Hypr -->|"reads hypr configs"| HyprlandConf
    Hypr -->|"launches"| AGS
    AGS -->|"loads widgets/styles"| App
    AGS -->|"applies themes"| GTK
    NVIM -->|"reads configs"| Init

    click README "https://github.com/gui200428/dotfiles/blob/main/README.md"
    click Arch "https://github.com/gui200428/dotfiles/blob/main/Scripts/arch.sh"
    click Backup "https://github.com/gui200428/dotfiles/blob/main/Scripts/backup-arch.sh"
    click App "https://github.com/gui200428/dotfiles/blob/main/ags/app.ts"
    click PackageJSON "https://github.com/gui200428/dotfiles/blob/main/ags/package.json"
    click TSConfig "https://github.com/gui200428/dotfiles/blob/main/ags/tsconfig.json"
    click StyleSCSS "https://github.com/gui200428/dotfiles/blob/main/ags/style/style.scss"
    click VarsSCSS "https://github.com/gui200428/dotfiles/blob/main/ags/style/variables.scss"
    click BarSCSS "https://github.com/gui200428/dotfiles/blob/main/ags/style/widgets/bar.scss"
    click Widgets "https://github.com/gui200428/dotfiles/tree/main/ags/widgets/"
    click GTK3 "https://github.com/gui200428/dotfiles/blob/main/gtk-3.0/settings.ini"
    click GTK4 "https://github.com/gui200428/dotfiles/blob/main/gtk-4.0/settings.ini"
    click HyprlandConf "https://github.com/gui200428/dotfiles/blob/main/hypr/hyprland.conf"
    click Autostart "https://github.com/gui200428/dotfiles/blob/main/hypr/autostart.conf"
    click Bindings "https://github.com/gui200428/dotfiles/blob/main/hypr/bindings.conf"
    click Input "https://github.com/gui200428/dotfiles/blob/main/hypr/input.conf"
    click Monitors "https://github.com/gui200428/dotfiles/blob/main/hypr/monitors.conf"
    click Programs "https://github.com/gui200428/dotfiles/blob/main/hypr/programs.conf"
    click ThemeConf "https://github.com/gui200428/dotfiles/blob/main/hypr/theme.conf"
    click Windows "https://github.com/gui200428/dotfiles/blob/main/hypr/windows.conf"
    click Paper "https://github.com/gui200428/dotfiles/blob/main/hypr/hyprpaper.conf"
    click Init "https://github.com/gui200428/dotfiles/blob/main/nvim/init.lua"
    click Stylua "https://github.com/gui200428/dotfiles/blob/main/nvim/.stylua.toml"
    click Doc "https://github.com/gui200428/dotfiles/blob/main/nvim/doc/kickstart.txt"
    click LuaCore "https://github.com/gui200428/dotfiles/tree/main/nvim/lua/core/"
    click LuaPlugins "https://github.com/gui200428/dotfiles/tree/main/nvim/lua/plugins/"
    click GHWF "https://github.com/gui200428/dotfiles/tree/main/nvim/.github/workflows/"
    click GHTemp "https://github.com/gui200428/dotfiles/tree/main/nvim/.github/templates/"
    click Pacman "https://github.com/gui200428/dotfiles/blob/main/system-pkgs-bkp/pacman_pkgs.txt"
    click AUR "https://github.com/gui200428/dotfiles/blob/main/system-pkgs-bkp/aur_pkgs.txt"

    classDef repo fill:#cce5ff,stroke:#004085;
    classDef script fill:#d4edda,stroke:#155724;
    classDef tool fill:#fff3cd,stroke:#856404;
    classDef runtime fill:#e2e3e5,stroke:#6c757d;
```
