# ghibranalj/.dotfiles architecture

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

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

## Overview

##### Main Components Organization

Create four main high-level sections:
a) System Configuration Layer
b) User Configuration Layer
c) Service Management Layer
d) Execution Layer

##### Component Breakdown

System Configuration Layer:
- X11 configurations
- Udev rules for device management
- Persistent-evdev configurations

User Configuration Layer:
- Window Manager (DWM) configuration
- Application configs (doom emacs, alacritty, rofi, dunst, etc.)
- Shell configurations (.bashrc)
- Custom scripts and binaries (.bin)

Service Management Layer:
- SystemD services (both system and user-level)

Execution Layer:
- Installation scripts
- Configuration deployment scripts
- Utility scripts

##### Relationships and Flows

- Installation flow (from makefile to various components)
- Service dependencies
- Configuration application flow
- Script execution paths

##### Implementation Details

- Configuration file locations
- Script locations
- Service definitions
- Udev rules

##### Notes for Abstraction

- Related configurations (e.g., all X11 configs)
- Service relationships without implementation details
- Configuration deployment paths
- Optional components (like optimus support)

- The role of the makefile as the central deployment mechanism
- The separation between system and user configurations
- Service management and dependencies
- The relationship between different configuration components

Keep the focus on the overall architecture while maintaining enough detail to understand the system's organization and deployment flow. This will help other developers understand how the different components interact and how the system is configured and maintained.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "System Configuration Layer"
        RootConfig["Root Configurations"]
        X11Config["X11 Configurations"]
        UdevRules["Udev Rules"]
        PersistEvdev["Persistent-evdev"]
    end

    subgraph "User Configuration Layer"
        WM["Window Manager (DWM)"]
        ShellConf["Shell Configuration"]
        CustomScripts["Custom Scripts"]
        
        subgraph "Application Configs"
            DoomEmacs["Doom Emacs"]
            Alacritty["Alacritty"]
            Rofi["Rofi"]
            Dunst["Dunst"]
            Picom["Picom"]
            Pipewire["Pipewire"]
        end
    end

    subgraph "Service Management Layer"
        SystemServices["System Services"]
        UserServices["User Services"]
    end

    subgraph "Execution Layer"
        InstallScripts["Installation Scripts"]
        ConfigScripts["Configuration Scripts"]
        UtilityScripts["Utility Scripts"]
    end

    subgraph "Special Components"
        GPUMgmt["GPU Management"]
        BluetoothConf["Bluetooth Configuration"]
        InputDevMgmt["Input Device Management"]
        KeybindConf["Keybinding Configuration"]
    end

    Makefile["Makefile"]:::central

    %% Relationships
    Makefile --> RootConfig
    Makefile --> UserServices
    Makefile --> SystemServices
    Makefile --> InstallScripts
    InstallScripts --> ConfigScripts
    ConfigScripts --> UtilityScripts
    
    RootConfig --> X11Config
    RootConfig --> UdevRules
    RootConfig --> PersistEvdev
    
    UserServices --> WM
    UserServices --> DoomEmacs
    UserServices --> Pipewire
    
    SystemServices --> GPUMgmt
    SystemServices --> BluetoothConf
    SystemServices --> InputDevMgmt

    %% Click Events
    click RootConfig "https://github.com/ghibranalj/.dotfiles/tree/master/root/etc/"
    click X11Config "https://github.com/ghibranalj/.dotfiles/tree/master/root/etc/X11/xorg.conf.d/"
    click UdevRules "https://github.com/ghibranalj/.dotfiles/tree/master/udev/"
    click PersistEvdev "https://github.com/ghibranalj/.dotfiles/tree/master/root/opt/persistent-evdev/"
    click WM "https://github.com/ghibranalj/.dotfiles/tree/master/home/.local/share/dwm/"
    click ShellConf "https://github.com/ghibranalj/.dotfiles/blob/master/home/.bashrc"
    click CustomScripts "https://github.com/ghibranalj/.dotfiles/tree/master/home/.bin/"
    click DoomEmacs "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/doom/"
    click Alacritty "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/alacritty/"
    click Rofi "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/rofi/"
    click Dunst "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/dunst/"
    click Picom "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/picom/"
    click Pipewire "https://github.com/ghibranalj/.dotfiles/tree/master/home/.config/pipewire/"
    click SystemServices "https://github.com/ghibranalj/.dotfiles/tree/master/systemd-root/etc/systemd/system/"
    click UserServices "https://github.com/ghibranalj/.dotfiles/tree/master/systemd/.config/systemd/user/"
    click InstallScripts "https://github.com/ghibranalj/.dotfiles/tree/master/exec/"
    click ConfigScripts "https://github.com/ghibranalj/.dotfiles/blob/master/exec/conf.sh"
    click UtilityScripts "https://github.com/ghibranalj/.dotfiles/tree/master/home/.bin/"
    click GPUMgmt "https://github.com/ghibranalj/.dotfiles/tree/master/configs/optimus-manager/"
    click BluetoothConf "https://github.com/ghibranalj/.dotfiles/tree/master/configs/bluetooth/"
    click InputDevMgmt "https://github.com/ghibranalj/.dotfiles/tree/master/gesture/"
    click KeybindConf "https://github.com/ghibranalj/.dotfiles/blob/master/home/.xbindkeysrc"
    click Makefile "https://github.com/ghibranalj/.dotfiles/tree/master/makefile"

    %% Styling
    classDef system fill:#ffcccc
    classDef user fill:#cce5ff
    classDef service fill:#ccffcc
    classDef execution fill:#ffffcc
    classDef central fill:#ff9999

    class RootConfig,X11Config,UdevRules,PersistEvdev system
    class WM,ShellConf,CustomScripts,DoomEmacs,Alacritty,Rofi,Dunst,Picom,Pipewire user
    class SystemServices,UserServices service
    class InstallScripts,ConfigScripts,UtilityScripts execution
    class Makefile central
```
