# yinonburgansky/custom-accel architecture

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

- Interactive diagram: https://gitdiagram.com/yinonburgansky/custom-accel
- Repository: https://github.com/yinonburgansky/custom-accel

## Overview

Custom Accel is a GTK desktop application for interactively tuning mouse and touchpad motion or scroll acceleration. The workflow selects a device, observes measured movement speed on an editable curve plot, applies settings, then lets the user keep or restore them. Internally, device management gathers input and delegates settings access to an X11/libinput settings adapter. The excerpts show the main UI, curve, and settings interactions; some dialog and event details are supported only by the README or source index.

Main entry points: [`src/custom-accel-window.c`](https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-window.c) (Tuning Window), [`src/device-manager.c`](https://github.com/yinonburgansky/custom-accel/blob/main/src/device-manager.c) (Device Manager), [`src/main.c`](https://github.com/yinonburgansky/custom-accel/blob/main/src/main.c) (Application Entry), [`src/custom-accel-application.c`](https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-application.c) (Application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application UI"]
  node_entry["Application Entry<br/>[main.c]"]
  node_application["Application"]
  node_window["Tuning Window"]
  node_applydialog["Apply / Restore Dialog"]
end

subgraph group_curve["Curve Editing"]
  node_plot["Plot Widget<br/>[plot-widget.c]"]
  node_bezier["Bezier Curve<br/>[bezier-curve.c]"]
end

subgraph group_device["Device Runtime"]
  node_devices["Device Manager<br/>[device-manager.c]"]
  node_pointer(("Pointer Devices"))
  node_libinput["libinput"]
end

subgraph group_settings["Settings Integration"]
  node_settingsmanager["Settings Adapter"]
  node_x11[("X11 Input Settings")]
end

node_user(("User"))

node_user -->|"launches"| node_entry
node_entry -->|"runs"| node_application
node_application -->|"presents"| node_window
node_user -->|"tunes device"| node_window
node_window -->|"updates plot"| node_plot
node_window -->|"creates curve"| node_bezier
node_plot -->|"dispatches curve"| node_bezier
node_window -->|"selects device"| node_devices
node_devices -->|"reports speed"| node_window
node_pointer -->|"provides events"| node_libinput
node_libinput -->|"delivers events"| node_devices
node_window -->|"opens apply flow"| node_applydialog
node_applydialog -->|"applies or restores"| node_devices
node_devices -->|"delegates settings"| node_settingsmanager
node_settingsmanager -->|"reads and writes"| node_x11

click node_entry "https://github.com/yinonburgansky/custom-accel/blob/main/src/main.c"
click node_application "https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-application.c"
click node_window "https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-window.c"
click node_applydialog "https://github.com/yinonburgansky/custom-accel/blob/main/src/apply-accel-settings-dialog.c"
click node_plot "https://github.com/yinonburgansky/custom-accel/blob/main/src/plot-widget.c"
click node_bezier "https://github.com/yinonburgansky/custom-accel/blob/main/src/bezier-curve.c"
click node_devices "https://github.com/yinonburgansky/custom-accel/blob/main/src/device-manager.c"
click node_settingsmanager "https://github.com/yinonburgansky/custom-accel/blob/main/src/x11-accel-settings-manager.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_entry,node_application,node_window,node_applydialog,node_user toneBlue
class node_plot,node_bezier toneAmber
class node_devices,node_pointer,node_libinput toneMint
class node_settingsmanager,node_x11 toneRose
```

## Components

### Application UI

- [Application Entry](https://github.com/yinonburgansky/custom-accel/blob/main/src/main.c): `src/main.c`
- [Application](https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-application.c): `src/custom-accel-application.c`
- [Tuning Window](https://github.com/yinonburgansky/custom-accel/blob/main/src/custom-accel-window.c): `src/custom-accel-window.c`
- [Apply / Restore Dialog](https://github.com/yinonburgansky/custom-accel/blob/main/src/apply-accel-settings-dialog.c): `src/apply-accel-settings-dialog.c`

### Curve Editing

- [Plot Widget](https://github.com/yinonburgansky/custom-accel/blob/main/src/plot-widget.c): `src/plot-widget.c`
- [Bezier Curve](https://github.com/yinonburgansky/custom-accel/blob/main/src/bezier-curve.c): `src/bezier-curve.c`

### Device Runtime

- [Device Manager](https://github.com/yinonburgansky/custom-accel/blob/main/src/device-manager.c): `src/device-manager.c`
- **Pointer Devices**
- **libinput**

### Settings Integration

- [Settings Adapter](https://github.com/yinonburgansky/custom-accel/blob/main/src/x11-accel-settings-manager.c): `src/x11-accel-settings-manager.c`
- **X11 Input Settings**

### Other components

- **User**

## Connections

- User → Application Entry: launches (evidence: `README.md`)
- Application Entry → Application: runs (evidence: `src/main.c`)
- Application → Tuning Window: presents (evidence: `src/custom-accel-application.c`)
- User → Tuning Window: tunes device (evidence: `README.md`)
- Tuning Window → Plot Widget: updates plot (evidence: `src/custom-accel-window.c`)
- Tuning Window → Bezier Curve: creates curve (evidence: `src/custom-accel-window.c`)
- Plot Widget → Bezier Curve: dispatches curve (evidence: `src/plot-widget.c`)
- Tuning Window → Device Manager: selects device (evidence: `src/custom-accel-window.c`)
- Device Manager → Tuning Window: reports speed (evidence: `src/custom-accel-window.c`)
- Pointer Devices → libinput: provides events
- libinput → Device Manager: delivers events (evidence: `src/device-manager.c`)
- Tuning Window → Apply / Restore Dialog: opens apply flow (evidence: `src/custom-accel-window.c`)
- Apply / Restore Dialog → Device Manager: applies or restores (evidence: `src/apply-accel-settings-dialog.c`)
- Device Manager → Settings Adapter: delegates settings (evidence: `src/device-manager.c`)
- Settings Adapter → X11 Input Settings: reads and writes (evidence: `README.md`)
