# larpmachine/svindwmrice88 architecture

> Architecture diagram of the GitHub repository larpmachine/svindwmrice88, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/larpmachine/svindwmrice88
- Repository: https://github.com/larpmachine/svindwmrice88

## Overview

This repository is a customized dwm X11 window manager. Its main workflow is keyboard-driven window and workspace management, with layout and bar state rendered to the desktop; optional patches add tray support, gaps, and restart-state persistence. Source excerpts show the X event loop, key bindings, drawing helpers, and several patches. Other patch relationships are limited to the explicit inclusion wiring in `patch/include.c`; unsampled implementation details are not inferred.

Main entry points: [`patch/include.c`](https://github.com/larpmachine/svindwmrice88/blob/main/patch/include.c) (Patch integration), [`dwm.c`](https://github.com/larpmachine/svindwmrice88/blob/main/dwm.c) (Window manager), [`patch/bar_systray.c`](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_systray.c) (System tray), [`config.h`](https://github.com/larpmachine/svindwmrice88/blob/main/config.h) (Manager configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_wm["Window management"]
  node_dwm["Window manager<br/>[dwm.c]"]
end

subgraph group_bar["Bar interface"]
  node_barcore["Bar assembly<br/>[bar.c]"]
  node_tags["Tag display<br/>[bar_tags.c]"]
  node_indicators["Tag indicators<br/>[bar_indicators.c]"]
  node_titles["Window titles<br/>[bar_wintitle.c]"]
  node_awesomebar["Window selection bar<br/>[bar_awesomebar.c]"]
  node_systray["System tray<br/>[bar_systray.c]"]
  node_wintitleactions["Title actions"]
end

subgraph group_layout["Layouts and state"]
  node_layouts["Tile and monocle layouts<br/>[layout_tile.c]"]
  node_gaps["Vanity gaps<br/>[vanitygaps.c]"]
  node_restart["State persistence<br/>[seamless_restart.c]"]
end

subgraph group_config["Configuration and rendering"]
  node_keys["Key bindings<br/>[keybinds.h]"]
  node_config["Manager configuration<br/>[config.h]"]
  node_colors["Color palette<br/>[colors.h]"]
  node_drawing["Xft drawing<br/>[drw.c]"]
  node_patches["Patch integration<br/>[include.c]"]
end

node_user(("Desktop user"))
node_xserver["X server"]
node_clients["Client windows"]
node_trayclients["Tray applications"]

node_user -->|"controls"| node_dwm
node_xserver -->|"delivers events"| node_dwm
node_dwm -->|"manages windows"| node_xserver
node_clients -.->|"create windows"| node_xserver
node_dwm -->|"uses settings"| node_config
node_config -->|"includes bindings"| node_keys
node_dwm -->|"uses drawing"| node_drawing
node_patches -->|"includes"| node_barcore
node_patches -->|"includes"| node_tags
node_patches -->|"includes"| node_indicators
node_patches -->|"includes"| node_titles
node_patches -->|"includes"| node_awesomebar
node_patches -->|"includes"| node_systray
node_patches -->|"includes"| node_wintitleactions
node_patches -->|"includes"| node_layouts
node_patches -->|"includes"| node_gaps
node_patches -->|"includes"| node_restart
node_dwm -->|"integrates patches"| node_patches
node_dwm -.->|"arranges clients"| node_layouts
node_dwm -.->|"adjusts spacing"| node_gaps
node_restart -->|"stores state"| node_xserver
node_trayclients -->|"dock icons"| node_systray
node_systray -->|"maps tray"| node_xserver
node_colors -->|"sets palette"| node_config

click node_dwm "https://github.com/larpmachine/svindwmrice88/blob/main/dwm.c"
click node_keys "https://github.com/larpmachine/svindwmrice88/blob/main/keybinds.h"
click node_config "https://github.com/larpmachine/svindwmrice88/blob/main/config.h"
click node_colors "https://github.com/larpmachine/svindwmrice88/blob/main/colors.h"
click node_drawing "https://github.com/larpmachine/svindwmrice88/blob/main/drw.c"
click node_barcore "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar.c"
click node_tags "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_tags.c"
click node_indicators "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_indicators.c"
click node_titles "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_wintitle.c"
click node_awesomebar "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_awesomebar.c"
click node_systray "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_systray.c"
click node_wintitleactions "https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_wintitleactions.c"
click node_layouts "https://github.com/larpmachine/svindwmrice88/blob/main/patch/layout_tile.c"
click node_gaps "https://github.com/larpmachine/svindwmrice88/blob/main/patch/vanitygaps.c"
click node_restart "https://github.com/larpmachine/svindwmrice88/blob/main/patch/seamless_restart.c"
click node_patches "https://github.com/larpmachine/svindwmrice88/blob/main/patch/include.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_dwm,node_user,node_clients toneBlue
class node_barcore,node_tags,node_indicators,node_titles,node_awesomebar,node_systray,node_wintitleactions toneAmber
class node_layouts,node_gaps,node_restart,node_xserver toneMint
class node_keys,node_config,node_colors,node_drawing,node_patches toneRose
class node_trayclients toneIndigo
```

## Components

### Window management

- [Window manager](https://github.com/larpmachine/svindwmrice88/blob/main/dwm.c): `dwm.c`

### Bar interface

- [Bar assembly](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar.c): `patch/bar.c`
- [Tag display](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_tags.c): `patch/bar_tags.c`
- [Tag indicators](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_indicators.c): `patch/bar_indicators.c`
- [Window titles](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_wintitle.c): `patch/bar_wintitle.c`
- [Window selection bar](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_awesomebar.c): `patch/bar_awesomebar.c`
- [System tray](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_systray.c): `patch/bar_systray.c`
- [Title actions](https://github.com/larpmachine/svindwmrice88/blob/main/patch/bar_wintitleactions.c): `patch/bar_wintitleactions.c`

### Layouts and state

- [Tile and monocle layouts](https://github.com/larpmachine/svindwmrice88/blob/main/patch/layout_tile.c): `patch/layout_tile.c`
- [Vanity gaps](https://github.com/larpmachine/svindwmrice88/blob/main/patch/vanitygaps.c): `patch/vanitygaps.c`
- [State persistence](https://github.com/larpmachine/svindwmrice88/blob/main/patch/seamless_restart.c): `patch/seamless_restart.c`

### Configuration and rendering

- [Key bindings](https://github.com/larpmachine/svindwmrice88/blob/main/keybinds.h): `keybinds.h`
- [Manager configuration](https://github.com/larpmachine/svindwmrice88/blob/main/config.h): `config.h`
- [Color palette](https://github.com/larpmachine/svindwmrice88/blob/main/colors.h): `colors.h`
- [Xft drawing](https://github.com/larpmachine/svindwmrice88/blob/main/drw.c): `drw.c`
- [Patch integration](https://github.com/larpmachine/svindwmrice88/blob/main/patch/include.c): `patch/include.c`

### Other components

- **Desktop user**
- **X server**
- **Client windows**
- **Tray applications**

## Connections

- Desktop user → Window manager: controls
- X server → Window manager: delivers events (evidence: `dwm.c`)
- Window manager → X server: manages windows (evidence: `dwm.c`)
- Client windows → X server: create windows
- Window manager → Manager configuration: uses settings (evidence: `dwm.c`)
- Manager configuration → Key bindings: includes bindings (evidence: `config.h`)
- Window manager → Xft drawing: uses drawing (evidence: `dwm.c`)
- Patch integration → Bar assembly: includes (evidence: `patch/include.c`)
- Patch integration → Tag display: includes (evidence: `patch/include.c`)
- Patch integration → Tag indicators: includes (evidence: `patch/include.c`)
- Patch integration → Window titles: includes (evidence: `patch/include.c`)
- Patch integration → Window selection bar: includes (evidence: `patch/include.c`)
- Patch integration → System tray: includes (evidence: `patch/include.c`)
- Patch integration → Title actions: includes (evidence: `patch/include.c`)
- Patch integration → Tile and monocle layouts: includes (evidence: `patch/include.c`)
- Patch integration → Vanity gaps: includes (evidence: `patch/include.c`)
- Patch integration → State persistence: includes (evidence: `patch/include.c`)
- Window manager → Patch integration: integrates patches (evidence: `dwm.c`)
- Window manager → Tile and monocle layouts: arranges clients
- Window manager → Vanity gaps: adjusts spacing
- State persistence → X server: stores state (evidence: `patch/seamless_restart.c`)
- Tray applications → System tray: dock icons (evidence: `patch/bar_systray.c`)
- System tray → X server: maps tray (evidence: `patch/bar_systray.c`)
- Color palette → Manager configuration: sets palette (evidence: `config.h`)
