# fyzugx/desk architecture

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

- Interactive diagram: https://gitdiagram.com/fyzugx/desk
- Repository: https://github.com/fyzugx/desk

## Overview

DEsk is a Linux Wayland desktop whose central workflow is to turn user input into a skeuomorphic desktop interaction: launch and manage apps, use the desk’s built-in surfaces, and control system features. The graph preserves the README’s major capabilities and the distinct runtime modules visible in the tree. Some subsystem relationships are documented at the product level rather than shown in sampled call sites, so those edges cite the README; unsampled implementation details are not inferred.

Main entry points: [`src/index.c`](https://github.com/fyzugx/desk/blob/main/src/index.c) (Wayland desktop), [`src/panel.c`](https://github.com/fyzugx/desk/blob/main/src/panel.c) (Control panel), [`src/apps.c`](https://github.com/fyzugx/desk/blob/main/src/apps.c) (App bookshelf), [`src/gpu.c`](https://github.com/fyzugx/desk/blob/main/src/gpu.c) (Room renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop runtime"]
  node_compositor["Wayland desktop<br/>[index.c]"]
  node_window_paper["Paper windows<br/>[desk.h]"]
  node_room_render["Room renderer<br/>[gpu.c]"]
end

subgraph group_surfaces["Desk surfaces"]
  node_apps["App bookshelf<br/>[apps.c]"]
  node_agenda[("Calendar plans<br/>[agenda.c]")]
  node_memo["Memo pad<br/>[memo.c]"]
  node_notifications["Post box<br/>[post.c]"]
  node_occasions["Calendar occasions<br/>[occasion.c]"]
  node_settings["Shell Settings<br/>[settings.c]"]
end

subgraph group_system["System controls"]
  node_panel["Control panel<br/>[panel.c]"]
  node_tray["System tray<br/>[tray.c]"]
  node_power["Power controls<br/>[power.c]"]
  node_lock["Lock screen<br/>[lock.c]"]
  node_media["Media access<br/>[media.c]"]
  node_camera["Camera use<br/>[camera.c]"]
end

subgraph group_services["Shared services"]
  node_sound["Sound engine<br/>[sound.c]"]
  node_sound_synthesis["Sound synthesis<br/>[sfx.c]"]
  node_language["Localization<br/>[i18n.c]"]
  node_fonts["Font selection<br/>[fonts.c]"]
  node_input_method["Input methods<br/>[ime.c]"]
end

subgraph group_session["Session lifecycle"]
  node_session_manager["Desktop session<br/>[session.c]"]
end

node_user(("User"))
node_weather["Weather service"]
node_gpu["GPU device"]

node_user -->|"uses"| node_compositor
node_compositor -->|"shows"| node_window_paper
node_compositor -->|"renders room"| node_room_render
node_room_render -.->|"uses when available"| node_gpu
node_compositor -->|"opens shelf"| node_apps
node_apps -->|"launches apps"| node_user
node_compositor -->|"shows calendar"| node_agenda
node_compositor -->|"shows memo"| node_memo
node_compositor -->|"shows notices"| node_notifications
node_compositor -->|"shows controls"| node_panel
node_panel -->|"shows slips"| node_tray
node_panel -->|"controls power"| node_power
node_compositor -->|"locks screen"| node_lock
node_compositor -->|"tracks media use"| node_media
node_media -.->|"tracks camera"| node_camera
node_compositor -->|"shows occasions"| node_occasions
node_user -->|"changes settings"| node_settings
node_settings -->|"configures defaults"| node_apps
node_compositor -->|"plays effects"| node_sound
node_sound -->|"requests samples"| node_sound_synthesis
node_compositor -->|"translates labels"| node_language
node_compositor -.->|"draws text"| node_fonts
node_user -->|"enters text"| node_input_method
node_compositor -->|"starts session"| node_session_manager
node_lock -.->|"requests forecast"| node_weather

click node_compositor "https://github.com/fyzugx/desk/blob/main/src/index.c"
click node_window_paper "https://github.com/fyzugx/desk/blob/main/include/desk.h"
click node_room_render "https://github.com/fyzugx/desk/blob/main/src/gpu.c"
click node_apps "https://github.com/fyzugx/desk/blob/main/src/apps.c"
click node_agenda "https://github.com/fyzugx/desk/blob/main/src/agenda.c"
click node_memo "https://github.com/fyzugx/desk/blob/main/src/memo.c"
click node_notifications "https://github.com/fyzugx/desk/blob/main/src/post.c"
click node_panel "https://github.com/fyzugx/desk/blob/main/src/panel.c"
click node_tray "https://github.com/fyzugx/desk/blob/main/src/tray.c"
click node_power "https://github.com/fyzugx/desk/blob/main/src/power.c"
click node_lock "https://github.com/fyzugx/desk/blob/main/src/lock.c"
click node_media "https://github.com/fyzugx/desk/blob/main/src/media.c"
click node_camera "https://github.com/fyzugx/desk/blob/main/src/camera.c"
click node_occasions "https://github.com/fyzugx/desk/blob/main/src/occasion.c"
click node_settings "https://github.com/fyzugx/desk/blob/main/src/settings.c"
click node_sound "https://github.com/fyzugx/desk/blob/main/src/sound.c"
click node_sound_synthesis "https://github.com/fyzugx/desk/blob/main/src/sfx.c"
click node_language "https://github.com/fyzugx/desk/blob/main/src/i18n.c"
click node_fonts "https://github.com/fyzugx/desk/blob/main/src/fonts.c"
click node_input_method "https://github.com/fyzugx/desk/blob/main/src/ime.c"
click node_session_manager "https://github.com/fyzugx/desk/blob/main/src/session.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_compositor,node_window_paper,node_room_render,node_user toneBlue
class node_apps,node_agenda,node_memo,node_notifications,node_occasions,node_settings toneAmber
class node_panel,node_tray,node_power,node_lock,node_media,node_camera toneMint
class node_sound,node_sound_synthesis,node_language,node_fonts,node_input_method toneRose
class node_session_manager,node_weather,node_gpu toneIndigo
```

## Components

### Desktop runtime

- [Wayland desktop](https://github.com/fyzugx/desk/blob/main/src/index.c): `src/index.c`
- [Paper windows](https://github.com/fyzugx/desk/blob/main/include/desk.h): `include/desk.h`
- [Room renderer](https://github.com/fyzugx/desk/blob/main/src/gpu.c): `src/gpu.c`

### Desk surfaces

- [App bookshelf](https://github.com/fyzugx/desk/blob/main/src/apps.c): `src/apps.c`
- [Calendar plans](https://github.com/fyzugx/desk/blob/main/src/agenda.c): `src/agenda.c`
- [Memo pad](https://github.com/fyzugx/desk/blob/main/src/memo.c): `src/memo.c`
- [Post box](https://github.com/fyzugx/desk/blob/main/src/post.c): `src/post.c`
- [Calendar occasions](https://github.com/fyzugx/desk/blob/main/src/occasion.c): `src/occasion.c`
- [Shell Settings](https://github.com/fyzugx/desk/blob/main/src/settings.c): `src/settings.c`

### System controls

- [Control panel](https://github.com/fyzugx/desk/blob/main/src/panel.c): `src/panel.c`
- [System tray](https://github.com/fyzugx/desk/blob/main/src/tray.c): `src/tray.c`
- [Power controls](https://github.com/fyzugx/desk/blob/main/src/power.c): `src/power.c`
- [Lock screen](https://github.com/fyzugx/desk/blob/main/src/lock.c): `src/lock.c`
- [Media access](https://github.com/fyzugx/desk/blob/main/src/media.c): `src/media.c`
- [Camera use](https://github.com/fyzugx/desk/blob/main/src/camera.c): `src/camera.c`

### Shared services

- [Sound engine](https://github.com/fyzugx/desk/blob/main/src/sound.c): `src/sound.c`
- [Sound synthesis](https://github.com/fyzugx/desk/blob/main/src/sfx.c): `src/sfx.c`
- [Localization](https://github.com/fyzugx/desk/blob/main/src/i18n.c): `src/i18n.c`
- [Font selection](https://github.com/fyzugx/desk/blob/main/src/fonts.c): `src/fonts.c`
- [Input methods](https://github.com/fyzugx/desk/blob/main/src/ime.c): `src/ime.c`

### Session lifecycle

- [Desktop session](https://github.com/fyzugx/desk/blob/main/src/session.c): `src/session.c`

### Other components

- **User**
- **Weather service**
- **GPU device**

## Connections

- User → Wayland desktop: uses (evidence: `README.md`)
- Wayland desktop → Paper windows: shows (evidence: `README.md`)
- Wayland desktop → Room renderer: renders room (evidence: `README.md`)
- Room renderer → GPU device: uses when available
- Wayland desktop → App bookshelf: opens shelf (evidence: `README.md`)
- App bookshelf → User: launches apps (evidence: `README.md`)
- Wayland desktop → Calendar plans: shows calendar (evidence: `README.md`)
- Wayland desktop → Memo pad: shows memo (evidence: `README.md`)
- Wayland desktop → Post box: shows notices (evidence: `README.md`)
- Wayland desktop → Control panel: shows controls (evidence: `README.md`)
- Control panel → System tray: shows slips (evidence: `README.md`)
- Control panel → Power controls: controls power (evidence: `README.md`)
- Wayland desktop → Lock screen: locks screen (evidence: `README.md`)
- Wayland desktop → Media access: tracks media use (evidence: `README.md`)
- Media access → Camera use: tracks camera
- Wayland desktop → Calendar occasions: shows occasions (evidence: `README.md`)
- User → Shell Settings: changes settings (evidence: `README.md`)
- Shell Settings → App bookshelf: configures defaults (evidence: `README.md`)
- Wayland desktop → Sound engine: plays effects
- Sound engine → Sound synthesis: requests samples
- Wayland desktop → Localization: translates labels (evidence: `README.md`)
- Wayland desktop → Font selection: draws text
- User → Input methods: enters text (evidence: `README.md`)
- Wayland desktop → Desktop session: starts session
- Lock screen → Weather service: requests forecast (evidence: `README.md`)
