# alexhulbert/seaglass architecture

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

- Interactive diagram: https://gitdiagram.com/alexhulbert/seaglass
- Repository: https://github.com/alexhulbert/seaglass

## Overview

##### Main System Components

a) System Configuration Layer
- Aconfmgr configuration (/system directory)
- System-level configurations (bootloader, base system, GUI, packages)
- System files and configurations (/system/files)

b) User Configuration Layer
- Home-manager configuration (/user directory)
- Personal configurations and customizations
- User-specific files and themes

c) Theming Engine Layer
- Integration points with various applications

##### Key Relationships to Highlight

- ↓
- Native Bridge → Dark Reader (Firefox/Chrome)
- ↓
- System-wide theming (GTK/Qt/KDE)

b) Window Management Flow:
**Hyprland → Hyprchroma Plugin**
- ↓
**KDE Integration → Plasmoids**
- ↓
**Window Rules/Scratchpad**

##### Component Details

- Core System Components (Rectangle)
- aconfmgr configurations
- System packages
- Base configurations

- User Components (Rounded Rectangle)
- Home-manager modules
- Personal configurations
- Application settings

- Integration Points (Hexagon)
- Native messaging hosts
- DBus services
- System hooks

##### Specific Implementation Details

Technical elements:

**Firefox/Chrome Integration**
- Native Messaging Host
- Custom Dark Reader Fork
- User Chrome/Content CSS

**KDE Integration**
- Plasmoid Manager
- DBus Services
- Window Rules

**Theme Engine**
- Pywal Templates
- Application Themes

##### Important Notes

Callouts for:
- First-time setup requirements
- System dependencies
- Configuration override points
- Integration requirements

This architecture represents a sophisticated Linux configuration management system with unique features for theming, window management, and desktop environment integration, which should be clearly reflected in the visual representation.

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and Classes
    classDef system fill:#e1f5fe,stroke:#01579b
    classDef user fill:#f3e5f5,stroke:#4a148c
    classDef theme fill:#fff3e0,stroke:#e65100
    classDef integration fill:#e8f5e9,stroke:#1b5e20
    classDef app fill:#fce4ec,stroke:#880e4f

    %% System Configuration Layer
    subgraph SystemLayer["System Configuration Layer"]
        BaseSystem["Base System"]
        GUISystem["GUI System"]
        SystemPkgs["System Packages"]
        SystemFiles["System Files"]
        
        BaseSystem --> GUISystem
        GUISystem --> SystemPkgs
        SystemPkgs --> SystemFiles
    end
    
    %% User Configuration Layer
    subgraph UserLayer["User Configuration Layer"]
        HomeManager["Home Manager"]
        PersonalConfig["Personal Configuration"]
        TerminalConfig["Terminal Configuration"]
        WindowMgmt["Window Management"]
        
        HomeManager --> PersonalConfig
        HomeManager --> TerminalConfig
        HomeManager --> WindowMgmt
    end
    
    %% Theming Engine Layer
    subgraph ThemeLayer["Theming Engine Layer"]
        ColorEngine["Color Scheme Engine"]
        PywalTemplates["Pywal Templates"]
        NativeBridge["Native Bridge"]
        
        ColorEngine --> PywalTemplates
        PywalTemplates --> NativeBridge
    end
    
    %% Window Management Components
    subgraph WindowLayer["Window Management"]
        Hyprland["Hyprland"]
        Pyprland["Pyprland"]
        KDEIntegration["KDE Integration"]
        
        Hyprland --> Pyprland
        Hyprland --> KDEIntegration
    end
    
    %% Application Layer
    subgraph AppLayer["Applications"]
        Firefox["Firefox Configuration"]
        VSCode["VSCode Configuration"]
        Waybar["Waybar Configuration"]
        Neovim["Vim/Neovim Configuration"]
    end
    
    %% Integration Points
    subgraph IntegrationLayer["System Integration"]
        SleepHandler["System Sleep Handler"]
        LidHandler["Lid Handler"]
        EnvConfig["Environment Configuration"]
        LoginConfig["Login Configuration"]
    end
    
    %% Cross-layer relationships
    ThemeLayer --> AppLayer
    WindowLayer --> UserLayer
    SystemLayer --> UserLayer
    UserLayer --> IntegrationLayer
    
    %% Click events for component mapping
    click BaseSystem "https://github.com/alexhulbert/seaglass/blob/main/system/20-base.sh"
    click GUISystem "https://github.com/alexhulbert/seaglass/blob/main/system/21-gui.sh"
    click SystemPkgs "https://github.com/alexhulbert/seaglass/blob/main/system/30-pkgs.sh"
    click SystemFiles "https://github.com/alexhulbert/seaglass/tree/main/system/files/"
    click HomeManager "https://github.com/alexhulbert/seaglass/blob/main/user/home.nix"
    click PersonalConfig "https://github.com/alexhulbert/seaglass/blob/main/user/personal.nix"
    click TerminalConfig "https://github.com/alexhulbert/seaglass/blob/main/user/terminal.nix"
    click WindowMgmt "https://github.com/alexhulbert/seaglass/blob/main/user/hyprland.nix"
    click ColorEngine "https://github.com/alexhulbert/seaglass/tree/main/user/files/theme/"
    click Firefox "https://github.com/alexhulbert/seaglass/blob/main/user/firefox.nix"
    click VSCode "https://github.com/alexhulbert/seaglass/blob/main/user/vscode.nix"
    click Neovim "https://github.com/alexhulbert/seaglass/tree/main/user/vim/nvim/"
    click Waybar "https://github.com/alexhulbert/seaglass/blob/main/user/waybar.nix"
    click Hyprland "https://github.com/alexhulbert/seaglass/blob/main/user/files/hyprland.conf"
    click Pyprland "https://github.com/alexhulbert/seaglass/blob/main/user/files/pyprland.toml"
    click KDEIntegration "https://github.com/alexhulbert/seaglass/blob/main/user/plasma.nix"
    click SleepHandler "https://github.com/alexhulbert/seaglass/blob/main/system/files/system-sleep.sh"
    click LidHandler "https://github.com/alexhulbert/seaglass/blob/main/user/files/lidhandler.sh"
    click EnvConfig "https://github.com/alexhulbert/seaglass/tree/main/system/files/environment"
    click LoginConfig "https://github.com/alexhulbert/seaglass/blob/main/system/files/logind.conf"
    
    %% Style applications
    class BaseSystem,GUISystem,SystemPkgs,SystemFiles system
    class HomeManager,PersonalConfig,TerminalConfig,WindowMgmt user
    class ColorEngine,PywalTemplates,NativeBridge theme
    class SleepHandler,LidHandler,EnvConfig,LoginConfig integration
    class Firefox,VSCode,Waybar,Neovim app
```
