# souandresouza/cadrocbar architecture

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

- Interactive diagram: https://gitdiagram.com/souandresouza/cadrocbar
- Repository: https://github.com/souandresouza/cadrocbar

## Overview

cadrocbar is a QuickShell bar and widget suite for Hyprland, with dynamic pywal theming and desktop controls. The user-facing flow is Hyprland/QuickShell displaying configured bar modules; those modules expose workspace, window, media, clock, power, audio, brightness, notification, and lock controls. Separate popup and launcher flows add calendar/media/power views and IPC-driven app search, calculation, web search, and command execution. The README documents these capabilities and the file tree gives their paths; sampled source is limited to the launcher and MPRIS scripts, so unshown QML wiring is not inferred.

Main entry points: [`quickshell/Bar.qml`](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Bar.qml) (Main bar), [`quickshell/Services/LauncherService.qml`](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/LauncherService.qml) (Launcher service), [`quickshell/Modules/Media.qml`](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Media.qml) (Media controls), [`quickshell/Common/Theme.qml`](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/Theme.qml) (Dynamic theme)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Shell and theme"]
  node_bar["Main bar<br/>[Bar.qml]"]
  node_theme["Dynamic theme<br/>[Theme.qml]"]
  node_popoutbase["Popout base<br/>[PopoutBase.qml]"]
  node_math["Math evaluator<br/>[MathEval.qml]"]
end

subgraph group_status["Bar modules"]
  node_workspaces["Workspaces and focus<br/>[Workspaces.qml]"]
  node_clock["Clock<br/>[Clock.qml]"]
  node_media["Media controls<br/>[Media.qml]"]
  node_audio["Audio controls<br/>[Audio.qml]"]
  node_backlight["Backlight controls<br/>[Backlight.qml]"]
  node_battery["Battery status<br/>[Battery.qml]"]
  node_idle["Idle inhibitor<br/>[IdleInhibitor.qml]"]
  node_notifications["Notification toggle<br/>[Swaync.qml]"]
  node_power["Power menu<br/>[PowerMenu.qml]"]
  node_lock["Lock control<br/>[Lock.qml]"]
end

subgraph group_services["Services"]
  node_audio_service["Audio service<br/>[AudioService.qml]"]
  node_backlight_service["Backlight service"]
  node_idle_service["Idle service"]
  node_launcher["Launcher service"]
  node_mpris["MPRIS service<br/>[MprisService.qml]"]
  node_popup_service["Popup service<br/>[PopupService.qml]"]
end

subgraph group_popouts["Popouts"]
  node_calendar_popup["Calendar popup<br/>[CalendarPopup.qml]"]
  node_media_popup["Media popup<br/>[MediaPopup.qml]"]
  node_power_popup["Power popup<br/>[PowerMenuPopup.qml]"]
end

subgraph group_scripts["Helper scripts"]
  node_launcher_script["App discovery<br/>[launcher.py]"]
  node_mpris_script["MPRIS bridge<br/>[mpris.py]"]
end

node_user(("Desktop user"))
node_quickshell["QuickShell runtime"]
node_hyprland["Hyprland"]
node_swaync["swaync"]
node_wpctl["PipeWire / wpctl"]
node_brightnessctl["brightnessctl"]
node_mpris_players["MPRIS players"]
node_wlcopy["wl-copy"]

node_user -->|"starts"| node_quickshell
node_quickshell -->|"loads"| node_bar
node_bar -->|"shows"| node_workspaces
node_bar -->|"shows"| node_clock
node_bar -->|"shows"| node_media
node_bar -->|"shows"| node_audio
node_bar -->|"shows"| node_backlight
node_bar -->|"shows"| node_battery
node_bar -->|"shows"| node_idle
node_bar -->|"shows"| node_notifications
node_bar -->|"shows"| node_power
node_bar -->|"shows"| node_lock
node_workspaces -->|"reports desktop state"| node_hyprland
node_notifications -.->|"toggles panel"| node_swaync
node_audio -.->|"controls"| node_audio_service
node_backlight -.->|"controls"| node_backlight_service
node_idle -.->|"toggles"| node_idle_service
node_audio_service -->|"controls volume"| node_wpctl
node_backlight_service -->|"controls brightness"| node_brightnessctl
node_media -.->|"controls playback"| node_mpris
node_mpris -.->|"uses bridge"| node_mpris_script
node_mpris_script -->|"reads and controls"| node_mpris_players
node_power -.->|"opens"| node_power_popup
node_media -.->|"opens"| node_media_popup
node_bar -.->|"offers calendar"| node_calendar_popup
node_launcher -.->|"discovers apps"| node_launcher_script
node_launcher_script -->|"reads palette colors"| node_theme
node_launcher -.->|"evaluates expressions"| node_math
node_launcher -->|"copies result"| node_wlcopy
node_user -->|"invokes by IPC"| node_launcher
node_user -->|"invokes by IPC"| node_lock
node_user -->|"reloads by IPC"| node_theme
node_theme -.->|"themes"| node_bar

click node_bar "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Bar.qml"
click node_theme "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/Theme.qml"
click node_popoutbase "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/PopoutBase.qml"
click node_math "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/MathEval.qml"
click node_workspaces "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Workspaces.qml"
click node_clock "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Clock.qml"
click node_media "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Media.qml"
click node_audio "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Audio.qml"
click node_backlight "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Backlight.qml"
click node_battery "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Battery.qml"
click node_idle "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/IdleInhibitor.qml"
click node_notifications "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Swaync.qml"
click node_power "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/PowerMenu.qml"
click node_lock "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Lock.qml"
click node_audio_service "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/AudioService.qml"
click node_backlight_service "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/BacklightService.qml"
click node_idle_service "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/IdleInhibitorService.qml"
click node_launcher "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/LauncherService.qml"
click node_mpris "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/MprisService.qml"
click node_popup_service "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/PopupService.qml"
click node_calendar_popup "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/CalendarPopup.qml"
click node_media_popup "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/MediaPopup.qml"
click node_power_popup "https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/PowerMenuPopup.qml"
click node_launcher_script "https://github.com/souandresouza/cadrocbar/blob/main/scripts/launcher.py"
click node_mpris_script "https://github.com/souandresouza/cadrocbar/blob/main/scripts/mpris.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_bar,node_theme,node_popoutbase,node_math,node_user toneBlue
class node_workspaces,node_clock,node_media,node_audio,node_backlight,node_battery,node_idle,node_notifications,node_power,node_lock toneAmber
class node_audio_service,node_backlight_service,node_idle_service,node_launcher,node_mpris,node_popup_service toneMint
class node_calendar_popup,node_media_popup,node_power_popup toneRose
class node_launcher_script,node_mpris_script,node_quickshell,node_hyprland,node_swaync,node_wpctl,node_brightnessctl,node_mpris_players,node_wlcopy toneIndigo
```

## Components

### Shell and theme

- [Main bar](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Bar.qml): `quickshell/Bar.qml`
- [Dynamic theme](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/Theme.qml): `quickshell/Common/Theme.qml`
- [Popout base](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/PopoutBase.qml): `quickshell/Common/PopoutBase.qml`
- [Math evaluator](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Common/MathEval.qml): `quickshell/Common/MathEval.qml`

### Bar modules

- [Workspaces and focus](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Workspaces.qml): `quickshell/Modules/Workspaces.qml`
- [Clock](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Clock.qml): `quickshell/Modules/Clock.qml`
- [Media controls](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Media.qml): `quickshell/Modules/Media.qml`
- [Audio controls](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Audio.qml): `quickshell/Modules/Audio.qml`
- [Backlight controls](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Backlight.qml): `quickshell/Modules/Backlight.qml`
- [Battery status](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Battery.qml): `quickshell/Modules/Battery.qml`
- [Idle inhibitor](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/IdleInhibitor.qml): `quickshell/Modules/IdleInhibitor.qml`
- [Notification toggle](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Swaync.qml): `quickshell/Modules/Swaync.qml`
- [Power menu](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/PowerMenu.qml): `quickshell/Modules/PowerMenu.qml`
- [Lock control](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Modules/Lock.qml): `quickshell/Modules/Lock.qml`

### Services

- [Audio service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/AudioService.qml): `quickshell/Services/AudioService.qml`
- [Backlight service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/BacklightService.qml): `quickshell/Services/BacklightService.qml`
- [Idle service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/IdleInhibitorService.qml): `quickshell/Services/IdleInhibitorService.qml`
- [Launcher service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/LauncherService.qml): `quickshell/Services/LauncherService.qml`
- [MPRIS service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/MprisService.qml): `quickshell/Services/MprisService.qml`
- [Popup service](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Services/PopupService.qml): `quickshell/Services/PopupService.qml`

### Popouts

- [Calendar popup](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/CalendarPopup.qml): `quickshell/Popouts/CalendarPopup.qml`
- [Media popup](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/MediaPopup.qml): `quickshell/Popouts/MediaPopup.qml`
- [Power popup](https://github.com/souandresouza/cadrocbar/blob/main/quickshell/Popouts/PowerMenuPopup.qml): `quickshell/Popouts/PowerMenuPopup.qml`

### Helper scripts

- [App discovery](https://github.com/souandresouza/cadrocbar/blob/main/scripts/launcher.py): `scripts/launcher.py`
- [MPRIS bridge](https://github.com/souandresouza/cadrocbar/blob/main/scripts/mpris.py): `scripts/mpris.py`

### Other components

- **Desktop user**
- **QuickShell runtime**
- **Hyprland**
- **swaync**
- **PipeWire / wpctl**
- **brightnessctl**
- **MPRIS players**
- **wl-copy**

## Connections

- Desktop user → QuickShell runtime: starts (evidence: `README.md`)
- QuickShell runtime → Main bar: loads (evidence: `README.md`)
- Main bar → Workspaces and focus: shows (evidence: `README.md`)
- Main bar → Clock: shows (evidence: `README.md`)
- Main bar → Media controls: shows (evidence: `README.md`)
- Main bar → Audio controls: shows (evidence: `README.md`)
- Main bar → Backlight controls: shows (evidence: `README.md`)
- Main bar → Battery status: shows (evidence: `README.md`)
- Main bar → Idle inhibitor: shows (evidence: `README.md`)
- Main bar → Notification toggle: shows (evidence: `README.md`)
- Main bar → Power menu: shows (evidence: `README.md`)
- Main bar → Lock control: shows (evidence: `README.md`)
- Workspaces and focus → Hyprland: reports desktop state (evidence: `README.md`)
- Notification toggle → swaync: toggles panel (evidence: `README.md`)
- Audio controls → Audio service: controls
- Backlight controls → Backlight service: controls
- Idle inhibitor → Idle service: toggles
- Audio service → PipeWire / wpctl: controls volume (evidence: `README.md`)
- Backlight service → brightnessctl: controls brightness (evidence: `README.md`)
- Media controls → MPRIS service: controls playback
- MPRIS service → MPRIS bridge: uses bridge
- MPRIS bridge → MPRIS players: reads and controls (evidence: `scripts/mpris.py`)
- Power menu → Power popup: opens
- Media controls → Media popup: opens
- Main bar → Calendar popup: offers calendar
- Launcher service → App discovery: discovers apps
- App discovery → Dynamic theme: reads palette colors (evidence: `scripts/launcher.py`)
- Launcher service → Math evaluator: evaluates expressions
- Launcher service → wl-copy: copies result (evidence: `README.md`)
- Desktop user → Launcher service: invokes by IPC (evidence: `README.md`)
- Desktop user → Lock control: invokes by IPC (evidence: `README.md`)
- Desktop user → Dynamic theme: reloads by IPC (evidence: `README.md`)
- Dynamic theme → Main bar: themes
