# tothestars1/cueless architecture

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

- Interactive diagram: https://gitdiagram.com/tothestars1/cueless
- Repository: https://github.com/tothestars1/cueless

## Overview

Cueless is a Linux desktop control app for the Corsair Virtuoso RGB Wireless XT. Users launch into a persistent top-bar app or open its window, then change EQ, headset controls, and preferences; the controller coordinates headset and PipeWire workers and publishes state to both interfaces. Headset discovery/control, audio routing/EQ, battery reporting, presets, settings, and optional desktop integrations are distinct runtime areas. Edges reflect README statements and shown source references; several UI actions and integrations are documented but their implementations were only partly sampled.

Main entry points: [`cueless/controller.py`](https://github.com/tothestars1/cueless/blob/main/cueless/controller.py) (State controller), [`cueless/app.py`](https://github.com/tothestars1/cueless/blob/main/cueless/app.py) (Application lifecycle), [`cueless/tray.py`](https://github.com/tothestars1/cueless/blob/main/cueless/tray.py) (Top-bar menu), [`cueless/headset.py`](https://github.com/tothestars1/cueless/blob/main/cueless/headset.py) (Headset worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Desktop app"]
  node_app["Application lifecycle<br/>[app.py]"]
  node_window["Control window<br/>[window.py]"]
  node_tray["Top-bar menu<br/>[tray.py]"]
  node_icons["Tray icons<br/>[icons.py]"]
  node_controller["State controller<br/>[controller.py]"]
end

subgraph group_control["Headset control"]
  node_headset["Headset worker<br/>[headset.py]"]
  node_hid["HID transport<br/>[hid.py]"]
  node_protocol["Bragi protocol<br/>[protocol.py]"]
end

subgraph group_audio["Audio processing"]
  node_audio["Audio worker<br/>[audio.py]"]
  node_eq["PipeWire EQ<br/>[eq.py]"]
end

subgraph group_prefs["Preferences and battery"]
  node_settings[("Settings store<br/>[settings.py]")]
  node_presets["EQ presets<br/>[presets.py]"]
  node_battery["Battery status<br/>[battery.py]"]
  node_sound["Mute sounds<br/>[sound.py]"]
  node_autostart["Login startup<br/>[autostart.py]"]
end

node_user(("Desktop user"))
node_pipewire[("PipeWire")]
node_notifications["Desktop notifications"]
node_sessionbus["Desktop session bus"]
node_headset_device["Corsair headset"]

node_user -->|"launches"| node_app
node_app -->|"creates"| node_controller
node_app -->|"creates"| node_tray
node_app -->|"opens"| node_window
node_window -->|"changes state"| node_controller
node_tray -->|"changes state"| node_controller
node_tray -->|"uses"| node_icons
node_controller -->|"starts and stops"| node_headset
node_controller -->|"starts and stops"| node_audio
node_controller -->|"loads and saves"| node_settings
node_controller -->|"manages presets"| node_presets
node_controller -->|"calculates alerts"| node_battery
node_controller -.->|"plays mute cue"| node_sound
node_headset -->|"discovers and reads"| node_hid
node_headset -->|"builds and parses"| node_protocol
node_hid -->|"uses identifiers"| node_protocol
node_headset -->|"controls"| node_headset_device
node_audio -->|"manages filter"| node_eq
node_eq -->|"routes and adjusts"| node_pipewire
node_audio -->|"reads graph"| node_pipewire
node_audio -->|"tracks audio output"| node_headset_device
node_settings -->|"validates saved curves"| node_presets
node_app -->|"sends alerts"| node_notifications
node_notifications -->|"uses"| node_sessionbus
node_tray -->|"registers item"| node_sessionbus
node_window -->|"configures login"| node_autostart
node_controller -->|"estimates runtime"| node_battery

click node_app "https://github.com/tothestars1/cueless/blob/main/cueless/app.py"
click node_window "https://github.com/tothestars1/cueless/blob/main/cueless/window.py"
click node_tray "https://github.com/tothestars1/cueless/blob/main/cueless/tray.py"
click node_icons "https://github.com/tothestars1/cueless/blob/main/cueless/icons.py"
click node_controller "https://github.com/tothestars1/cueless/blob/main/cueless/controller.py"
click node_headset "https://github.com/tothestars1/cueless/blob/main/cueless/headset.py"
click node_hid "https://github.com/tothestars1/cueless/blob/main/cueless/hid.py"
click node_protocol "https://github.com/tothestars1/cueless/blob/main/cueless/protocol.py"
click node_audio "https://github.com/tothestars1/cueless/blob/main/cueless/audio.py"
click node_eq "https://github.com/tothestars1/cueless/blob/main/cueless/eq.py"
click node_settings "https://github.com/tothestars1/cueless/blob/main/cueless/settings.py"
click node_presets "https://github.com/tothestars1/cueless/blob/main/cueless/presets.py"
click node_battery "https://github.com/tothestars1/cueless/blob/main/cueless/battery.py"
click node_sound "https://github.com/tothestars1/cueless/blob/main/cueless/sound.py"
click node_autostart "https://github.com/tothestars1/cueless/blob/main/cueless/autostart.py"

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_app,node_window,node_tray,node_icons,node_controller,node_user toneBlue
class node_headset,node_hid,node_protocol,node_pipewire toneAmber
class node_audio,node_eq toneMint
class node_settings,node_presets,node_battery,node_sound,node_autostart toneRose
class node_notifications,node_sessionbus,node_headset_device toneIndigo
```

## Components

### Desktop app

- [Application lifecycle](https://github.com/tothestars1/cueless/blob/main/cueless/app.py): `cueless/app.py`
- [Control window](https://github.com/tothestars1/cueless/blob/main/cueless/window.py): `cueless/window.py`
- [Top-bar menu](https://github.com/tothestars1/cueless/blob/main/cueless/tray.py): `cueless/tray.py`
- [Tray icons](https://github.com/tothestars1/cueless/blob/main/cueless/icons.py): `cueless/icons.py`
- [State controller](https://github.com/tothestars1/cueless/blob/main/cueless/controller.py): `cueless/controller.py`

### Headset control

- [Headset worker](https://github.com/tothestars1/cueless/blob/main/cueless/headset.py): `cueless/headset.py`
- [HID transport](https://github.com/tothestars1/cueless/blob/main/cueless/hid.py): `cueless/hid.py`
- [Bragi protocol](https://github.com/tothestars1/cueless/blob/main/cueless/protocol.py): `cueless/protocol.py`

### Audio processing

- [Audio worker](https://github.com/tothestars1/cueless/blob/main/cueless/audio.py): `cueless/audio.py`
- [PipeWire EQ](https://github.com/tothestars1/cueless/blob/main/cueless/eq.py): `cueless/eq.py`

### Preferences and battery

- [Settings store](https://github.com/tothestars1/cueless/blob/main/cueless/settings.py): `cueless/settings.py`
- [EQ presets](https://github.com/tothestars1/cueless/blob/main/cueless/presets.py): `cueless/presets.py`
- [Battery status](https://github.com/tothestars1/cueless/blob/main/cueless/battery.py): `cueless/battery.py`
- [Mute sounds](https://github.com/tothestars1/cueless/blob/main/cueless/sound.py): `cueless/sound.py`
- [Login startup](https://github.com/tothestars1/cueless/blob/main/cueless/autostart.py): `cueless/autostart.py`

### Other components

- **Desktop user**
- **PipeWire**
- **Desktop notifications**
- **Desktop session bus**
- **Corsair headset**

## Connections

- Desktop user → Application lifecycle: launches (evidence: `README.md`)
- Application lifecycle → State controller: creates (evidence: `cueless/app.py`)
- Application lifecycle → Top-bar menu: creates (evidence: `cueless/app.py`)
- Application lifecycle → Control window: opens (evidence: `cueless/app.py`)
- Control window → State controller: changes state (evidence: `cueless/window.py`)
- Top-bar menu → State controller: changes state (evidence: `cueless/tray.py`)
- Top-bar menu → Tray icons: uses (evidence: `cueless/tray.py`)
- State controller → Headset worker: starts and stops (evidence: `cueless/controller.py`)
- State controller → Audio worker: starts and stops (evidence: `cueless/controller.py`)
- State controller → Settings store: loads and saves (evidence: `cueless/controller.py`)
- State controller → EQ presets: manages presets (evidence: `cueless/controller.py`)
- State controller → Battery status: calculates alerts (evidence: `cueless/controller.py`)
- State controller → Mute sounds: plays mute cue
- Headset worker → HID transport: discovers and reads (evidence: `cueless/headset.py`)
- Headset worker → Bragi protocol: builds and parses (evidence: `cueless/headset.py`)
- HID transport → Bragi protocol: uses identifiers (evidence: `cueless/hid.py`)
- Headset worker → Corsair headset: controls (evidence: `README.md`)
- Audio worker → PipeWire EQ: manages filter (evidence: `cueless/audio.py`)
- PipeWire EQ → PipeWire: routes and adjusts (evidence: `README.md`)
- Audio worker → PipeWire: reads graph (evidence: `cueless/audio.py`)
- Audio worker → Corsair headset: tracks audio output (evidence: `README.md`)
- Settings store → EQ presets: validates saved curves (evidence: `cueless/settings.py`)
- Application lifecycle → Desktop notifications: sends alerts (evidence: `cueless/app.py`)
- Desktop notifications → Desktop session bus: uses
- Top-bar menu → Desktop session bus: registers item (evidence: `cueless/tray.py`)
- Control window → Login startup: configures login (evidence: `cueless/window.py`)
- State controller → Battery status: estimates runtime (evidence: `cueless/controller.py`)
