# alex11br/themechanger architecture

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

- Interactive diagram: https://gitdiagram.com/alex11br/themechanger
- Repository: https://github.com/alex11br/themechanger

## Overview

ThemeChanger is a GTK desktop utility for selecting, configuring, previewing, and installing Linux themes. The main workflow starts at the application window, discovers available themes, lets users choose themes and options (including live CSS editing), then applies settings to user configuration and desktop-environment mechanisms; users can also install theme archives. The UI excerpt directly shows theme discovery, selection widgets, and archive refresh, while README documents broader capabilities. Several implementation details and wiring in unsampled window code are not asserted.

Main entry points: [`src/window.py`](https://github.com/alex11br/themechanger/blob/master/src/window.py) (Theme window), [`src/applythemes.py`](https://github.com/alex11br/themechanger/blob/master/src/applythemes.py) (Theme configuration), [`src/installthemes.py`](https://github.com/alex11br/themechanger/blob/master/src/installthemes.py) (Archive chooser), [`src/getavailablethemes.py`](https://github.com/alex11br/themechanger/blob/master/src/getavailablethemes.py) (Theme discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Application UI"]
  node_app["GTK application<br/>[main.py]"]
  node_window["Theme window<br/>[window.py]"]
end

subgraph group_themes["Theme selection"]
  node_selector["Searchable selector"]
  node_discovery["Theme discovery"]
  node_cursorpreview["Cursor previews"]
end

subgraph group_apply["Settings application"]
  node_applycore["Theme configuration<br/>[applythemes.py]"]
  node_desktopsettings["Desktop settings<br/>[applythemes.py]"]
  node_userconfig[("User theme configuration")]
end

subgraph group_install["Theme installation"]
  node_archivechooser["Archive chooser<br/>[installthemes.py]"]
  node_archivefilter["Archive format filter"]
  node_archiveinstaller["Archive extraction<br/>[installthemes.py]"]
  node_themedirs[("User theme directories")]
end

node_user(("Desktop user"))
node_runningapps(("Running applications"))

node_user -->|"launches"| node_app
node_app -->|"creates"| node_window
node_user -.->|"configures"| node_window
node_window -->|"loads themes"| node_discovery
node_window -->|"creates selector"| node_selector
node_discovery -->|"renders cursors"| node_cursorpreview
node_window -.->|"applies settings"| node_applycore
node_applycore -->|"writes configuration"| node_userconfig
node_applycore -->|"updates desktop"| node_desktopsettings
node_desktopsettings -.->|"refreshes settings"| node_runningapps
node_window -->|"starts install"| node_archivechooser
node_archivechooser -->|"filters archives"| node_archivefilter
node_archivechooser -.->|"installs archive"| node_archiveinstaller
node_archiveinstaller -->|"copies themes"| node_themedirs
node_window -->|"refreshes lists"| node_discovery

click node_app "https://github.com/alex11br/themechanger/blob/master/src/main.py"
click node_window "https://github.com/alex11br/themechanger/blob/master/src/window.py"
click node_selector "https://github.com/alex11br/themechanger/blob/master/src/searchablethemelist.py"
click node_discovery "https://github.com/alex11br/themechanger/blob/master/src/getavailablethemes.py"
click node_cursorpreview "https://github.com/alex11br/themechanger/blob/master/src/pixbuffromxcursor.c"
click node_applycore "https://github.com/alex11br/themechanger/blob/master/src/applythemes.py"
click node_desktopsettings "https://github.com/alex11br/themechanger/blob/master/src/applythemes.py"
click node_archivechooser "https://github.com/alex11br/themechanger/blob/master/src/installthemes.py"
click node_archivefilter "https://github.com/alex11br/themechanger/blob/master/src/archivefilefilter.py"
click node_archiveinstaller "https://github.com/alex11br/themechanger/blob/master/src/installthemes.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_user toneBlue
class node_selector,node_discovery,node_cursorpreview toneAmber
class node_applycore,node_desktopsettings,node_userconfig toneMint
class node_archivechooser,node_archivefilter,node_archiveinstaller,node_themedirs toneRose
class node_runningapps toneIndigo
```

## Components

### Application UI

- [GTK application](https://github.com/alex11br/themechanger/blob/master/src/main.py): `src/main.py`
- [Theme window](https://github.com/alex11br/themechanger/blob/master/src/window.py): `src/window.py`

### Theme selection

- [Searchable selector](https://github.com/alex11br/themechanger/blob/master/src/searchablethemelist.py): `src/searchablethemelist.py`
- [Theme discovery](https://github.com/alex11br/themechanger/blob/master/src/getavailablethemes.py): `src/getavailablethemes.py`
- [Cursor previews](https://github.com/alex11br/themechanger/blob/master/src/pixbuffromxcursor.c): `src/pixbuffromxcursor.c`

### Settings application

- [Theme configuration](https://github.com/alex11br/themechanger/blob/master/src/applythemes.py): `src/applythemes.py`
- [Desktop settings](https://github.com/alex11br/themechanger/blob/master/src/applythemes.py): `src/applythemes.py`
- **User theme configuration**

### Theme installation

- [Archive chooser](https://github.com/alex11br/themechanger/blob/master/src/installthemes.py): `src/installthemes.py`
- [Archive format filter](https://github.com/alex11br/themechanger/blob/master/src/archivefilefilter.py): `src/archivefilefilter.py`
- [Archive extraction](https://github.com/alex11br/themechanger/blob/master/src/installthemes.py): `src/installthemes.py`
- **User theme directories**

### Other components

- **Desktop user**
- **Running applications**

## Connections

- Desktop user → GTK application: launches (evidence: `src/main.py`)
- GTK application → Theme window: creates (evidence: `src/main.py`)
- Desktop user → Theme window: configures (evidence: `README.md`)
- Theme window → Theme discovery: loads themes (evidence: `src/window.py`)
- Theme window → Searchable selector: creates selector (evidence: `src/window.py`)
- Theme discovery → Cursor previews: renders cursors (evidence: `src/getavailablethemes.py`)
- Theme window → Theme configuration: applies settings (evidence: `src/window.py`)
- Theme configuration → User theme configuration: writes configuration (evidence: `src/applythemes.py`)
- Theme configuration → Desktop settings: updates desktop (evidence: `src/applythemes.py`)
- Desktop settings → Running applications: refreshes settings (evidence: `README.md`)
- Theme window → Archive chooser: starts install (evidence: `src/window.py`)
- Archive chooser → Archive format filter: filters archives (evidence: `src/installthemes.py`)
- Archive chooser → Archive extraction: installs archive (evidence: `src/installthemes.py`)
- Archive extraction → User theme directories: copies themes (evidence: `src/installthemes.py`)
- Theme window → Theme discovery: refreshes lists (evidence: `src/window.py`)
