# gh0stzk/dotfiles architecture

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

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

## Overview

##### Main Components Structure

The system should be represented as a layered architecture with these primary components:

**┌─────────────────────────────────────────────────────────────┐**
- User Interface Layer                      │
- ┤
- Theme Management Layer                    │
- ┤
- Window Management Layer                   │
- ┤
- System Services Layer                     │
- ┘

##### Component Details

a. User Interface Layer:
- Eww Widgets (Calendar, Music Player, Profile Card, Cheatsheet)
- Rofi Applets
- Notification System
- Lockscreen
- Terminal Emulators (Alacritty/Kitty)

b. Theme Management Layer:
- Components for:
- Rice Selector
- Theme Engine
- Wallpaper Manager
- Configuration Manager

c. Window Management Layer:
- BSPWM core components:
- Window Manager (BSPWM)
- Hotkey Daemon (sxhkd)
- Compositor (Picom)
- Workspace Manager

d. System Services Layer:
- Include:
- Network Manager
- Bluetooth Service
- Audio System
- Power Management
- File System Integration

##### Interaction Flows

- Theme switching flow
- Configuration updates
- Service interactions
- User input handling

##### Implementation Details

- Configuration file locations (/config directory)
- Script locations (/src directory)
- Resource locations (fonts, wallpapers)
- Plugin integration points

##### Deployment View

How components are organized in the file system:
- Config directory structure
- Theme assets location
- System integration points

This system design should be created using a tool that supports:
- Nested components
- Text annotations
- Grouping of related components

## Diagram (Mermaid)

```mermaid
graph TB
    %% Define styles
    classDef ui fill:#90EE90,stroke:#333,stroke-width:2px
    classDef theme fill:#DDA0DD,stroke:#333,stroke-width:2px
    classDef window fill:#87CEEB,stroke:#333,stroke-width:2px
    classDef system fill:#FFA500,stroke:#333,stroke-width:2px
    
    %% User Interface Layer
    subgraph UI["User Interface Layer"]
        EWW["Eww Widgets"]
        ROFI["Rofi Applets"]
        NOTIFY["Notification System"]
        LOCK["Lockscreen"]
        TERM["Terminal Emulators"]
        
        %% Eww Widget Components
        CAL["Calendar Widget"]
        MUSIC["Music Player"]
        PROF["Profile Card"]
        CHEAT["Cheatsheet"]
        
        %% Terminal Components
        ALA["Alacritty"]
        KITTY["Kitty"]
        
        %% Connect Eww components
        EWW --> CAL & MUSIC & PROF & CHEAT
        TERM --> ALA & KITTY
    end
    
    %% Theme Management Layer
    subgraph THEME["Theme Management Layer"]
        RICE["Rice Selector"]
        THEME_ENGINE["Theme Engine"]
        WALL["Wallpaper Manager"]
        COLOR["Color Scheme Manager"]
        CONFIG["Configuration Manager"]
        RICE_EDIT["Rice Editor"]
    end
    
    %% Window Management Layer
    subgraph WM["Window Management Layer"]
        BSPWM["BSPWM Core"]
        SXHKD["Hotkey Daemon"]
        PICOM["Compositor"]
        WORKSPACE["Workspace Manager"]
    end
    
    %% System Services Layer
    subgraph SYS["System Services Layer"]
        NET["Network Manager"]
        BT["Bluetooth Service"]
        AUDIO["Audio System"]
        POWER["Power Management"]
        FS["File System Integration"]
    end
    
    %% Inter-layer connections
    THEME_ENGINE --> EWW
    THEME_ENGINE --> TERM
    THEME_ENGINE --> ROFI
    RICE --> THEME_ENGINE
    WALL --> THEME_ENGINE
    
    BSPWM --> WORKSPACE
    SXHKD --> BSPWM
    PICOM --> BSPWM
    
    %% Click events for component mapping
    click BSPWM "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/bspwmrc"
    click SXHKD "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/config/sxhkdrc"
    click PICOM "https://github.com/gh0stzk/dotfiles/blob/master/config/bspwm/src/config/picom.conf"
    click RICE "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/RiceSelector"
    click THEME_ENGINE "https://github.com/gh0stzk/dotfiles/blob/master/config/bspwm/rices/*/Theme.sh"
    click WALL "https://github.com/gh0stzk/dotfiles/blob/master/config/bspwm/src/WallEngine.bash"
    click RICE_EDIT "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/RiceEditor"
    click CAL "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/eww/calendar"
    click MUSIC "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/eww/player"
    click PROF "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/eww/profilecard"
    click CHEAT "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/eww/cheatsheet"
    click ALA "https://github.com/gh0stzk/dotfiles/blob/master/config/alacritty/alacritty.toml"
    click KITTY "https://github.com/gh0stzk/dotfiles/blob/master/config/kitty/kitty.conf"
    click ROFI "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/rofi-themes"
    click NET "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/NetManagerDM"
    click BT "https://github.com/gh0stzk/dotfiles/blob/master/config/bspwm/src/bluetooth.sh"
    click AUDIO "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/Volume"
    click POWER "https://github.com/gh0stzk/dotfiles/tree/master/config/bspwm/src/PowerMenu"
    
    %% Apply classes
    class EWW,ROFI,NOTIFY,LOCK,TERM,CAL,MUSIC,PROF,CHEAT,ALA,KITTY ui;
    class RICE,THEME_ENGINE,WALL,COLOR,CONFIG,RICE_EDIT theme;
    class BSPWM,SXHKD,PICOM,WORKSPACE window;
    class NET,BT,AUDIO,POWER,FS system;
```
