# abhinavborah/bspwm-dotfiles architecture

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

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

## Overview

##### Project type and purpose
- This repo is not a traditional codebase but a “rice” or desktop‐environment configuration for Arch Linux.
- Its purpose is to define and organize user‐level components (window manager, status bar, compositing, etc.) through dotfiles under ~/.config.

##### File structure
- Top‐level config directories:
- .config/bspwm – bspwm window manager settings
- .config/sxhkd – hotkey daemon bindings
- .config/polybar – status bar configuration
- .config/picom – compositor rules
- .config/dunst – notification daemon settings
- README lists runtime dependencies (bspwm, sxhkd, polybar, picom, dunst, feh, dmenu, rxvt-unicode, figlet, etc.).
- No build scripts—these are user‐level daemons and utilities that launch at login.

##### README for additional insights
- The “Packages needed” section enumerates each runtime component.
- “Future Scopes” hints at an install script that pieces all configs together—so think of an init script or bootstrap process.

a. Main components
- X server (Xorg or equivalent)
- bspwm (tiling window manager)
- sxhkd (keyboard event daemon)
- polybar (status bar)
- picom (compositor for shadows, transparency)
- dunst (notification daemon)
- feh (wallpaper setter)
- dmenu (application launcher)
- urxvt (terminal emulator)
- figlet (ASCII banner generator)
- (Optional) redshift, flameshot, fonts subsystem
b. Relationships and interactions
- User input (keyboard/mouse) → sxhkd → bspwm
- bspwm ←→ X server (window placement, focus)
- bspwm → polybar (workspace info, system stats)
- bspwm windows rendered → picom → X server compositor
- Applications (term, gui apps) spawn via dmenu/sxhkd/bspwm
- System notifications → dunst → displayed to user
- Wallpaper set once at session start via feh → X server background
c. Architectural patterns and principles
- Modular daemon‐based design: each concern runs as its own process reading from ~/.config
- Event‐driven: sxhkd captures events, dunst listens for notifications
- Declarative config: pure text files define behavior, no central monolith
d. Key technologies
- bspwm (C, uses XCB)
- sxhkd (C)
- polybar (C++, customizable modules)
- picom (C)
- dunst (C)
- feh, dmenu, rxvt‐unicode, figlet (shell‐driven utilities)

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Session Initialization"
        direction TB
        Bashrc["Shell Startup (.bashrc)"]:::config
        Feh["feh (wallpaper setter)"]:::app
        Picom["picom (compositor)"]:::daemon
        Sxhkd["sxhkd (hotkey daemon)"]:::daemon
        Bspwm["bspwm (window manager)"]:::core
        Polybar["polybar (status bar)"]:::daemon
        Dunst["dunst (notification daemon)"]:::daemon

        Bashrc --> Feh
        Bashrc --> Picom
        Bashrc --> Sxhkd
        Bashrc --> Bspwm
        Bashrc --> Polybar
        Bashrc --> Dunst
    end

    subgraph "Runtime"
        direction TB
        UserInput["Keyboard/Mouse Input"]:::external
        XServer["X Server"]:::core
        Dmenu["dmenu (app launcher)"]:::app
        Urxvt["urxvt (terminal emulator)"]:::app
        Figlet["figlet (ASCII banner)"]:::app
        Dunst -->|"Notifications"| UserInterface["Display"]:::external

        UserInput --> Sxhkd
        Sxhkd -->|"Key Events"| Bspwm
        Bspwm <--> XServer
        Bspwm -->|"Workspace Info"| Polybar
        Bspwm -->|"Render Windows"| Picom
        Picom --> XServer
        Dmenu --> Bspwm
        Urxvt --> Bspwm
        Figlet --> Urxvt
    end

    subgraph "Config Files"
        direction TB
        BspwmRC["~/.config/bspwm/bspwmrc"]:::config
        SxhkdRC["~/.config/sxhkd/sxhkdrc"]:::config
        PolyConf["~/.config/polybar/config.ini"]:::config
        PicomConf["~/.config/picom/picom.conf"]:::config
        DunstRC["~/.config/dunst/dunstrc"]:::config
        Xdefaults["~/.Xdefaults"]:::config
        AsciiArt["Pictures/ascii/chad.txt"]:::config
        README["README.md"]:::config

        BspwmRC --> Bspwm
        SxhkdRC --> Sxhkd
        PolyConf --> Polybar
        PicomConf --> Picom
        DunstRC --> Dunst
        Xdefaults --> Urxvt
        Xdefaults --> XServer
        AsciiArt --> Figlet
        README -.-> Bashrc
    end

    classDef core fill:#add8e6,stroke:#000
    classDef daemon fill:#90ee90,stroke:#000
    classDef app fill:#ffa500,stroke:#000
    classDef config fill:none,stroke:#000,stroke-dasharray: 5 5
    classDef external fill:#f0f0f0,stroke:#000

    click Bspwm "https://github.com/abhinavborah/bspwm-dotfiles/tree/main/.config/bspwm/bspwmrc"
    click Sxhkd "https://github.com/abhinavborah/bspwm-dotfiles/tree/main/.config/sxhkd/sxhkdrc"
    click Polybar "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/.config/polybar/config.ini"
    click Picom "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/.config/picom/picom.conf"
    click Dunst "https://github.com/abhinavborah/bspwm-dotfiles/tree/main/.config/dunst/dunstrc"
    click Xdefaults "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/.Xdefaults"
    click Bashrc "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/.bashrc"
    click AsciiArt "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/Pictures/ascii/chad.txt"
    click README "https://github.com/abhinavborah/bspwm-dotfiles/blob/main/README.md"
```
