# fromwau/dotfiles architecture

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

- Interactive diagram: https://gitdiagram.com/fromwau/dotfiles
- Repository: https://github.com/fromwau/dotfiles

## Overview

This repository is a personal Linux desktop configuration, with an AGS bar and a small Rust CLI for shared Hyprland session state. The documented state workflow is: desktop tools invoke `hyprstate` to update `state.json`; AGS watches that file and refreshes its UI, while Hyprland reads it during reloads. The tree includes AGS and `hyprstate`, but not the documented Hyprland configuration or other client scripts, so those are represented only as external systems. Connections are based on the README or the sampled CLI source.

Main entry points: [`hyprstate/src/main.rs`](https://github.com/fromwau/dotfiles/blob/master/hyprstate/src/main.rs) (hyprstate CLI), [`.config/ags/utils/state.ts`](https://github.com/fromwau/dotfiles/blob/master/.config/ags/utils/state.ts) (State monitor), [`.config/ags/app.tsx`](https://github.com/fromwau/dotfiles/blob/master/.config/ags/app.tsx) (AGS application), [`.config/ags/widget/Bar.tsx`](https://github.com/fromwau/dotfiles/blob/master/.config/ags/widget/Bar.tsx) (Bar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop UI"]
  node_ags_app["AGS application<br/>[app.tsx]"]
  node_bar["Bar<br/>[Bar.tsx]"]
  node_settings["Settings UI<br/>[Settings.tsx]"]
  node_widgets["Status widgets<br/>[components]"]
  node_ags_state["State monitor<br/>[state.ts]"]
  node_display_mode["Display mode<br/>[displayMode.ts]"]
end

subgraph group_state["Session State"]
  node_hyprstate["hyprstate CLI<br/>[main.rs]"]
  node_state_file[("state.json")]
end

subgraph group_launch["App Launcher"]
  node_walker["Walker configuration<br/>[anyrun]"]
end

node_user(("Desktop user"))
node_hyprland["Hyprland"]
node_notify["Desktop notifications"]
node_other_tools(("Desktop state clients"))
node_launcher_user(("Launcher user"))

node_user -->|"uses"| node_ags_app
node_ags_app -->|"renders"| node_bar
node_ags_app -->|"renders"| node_settings
node_bar -->|"renders"| node_widgets
node_ags_state -->|"watches"| node_state_file
node_ags_state -->|"refreshes"| node_bar
node_ags_state -->|"refreshes"| node_widgets
node_other_tools -->|"invokes"| node_hyprstate
node_hyprstate -->|"reads and writes"| node_state_file
node_hyprstate -->|"reloads"| node_hyprland
node_hyprstate -->|"notifies"| node_notify
node_hyprland -->|"reads on reload"| node_state_file
node_launcher_user -.->|"launches"| node_walker

click node_ags_app "https://github.com/fromwau/dotfiles/blob/master/.config/ags/app.tsx"
click node_bar "https://github.com/fromwau/dotfiles/blob/master/.config/ags/widget/Bar.tsx"
click node_settings "https://github.com/fromwau/dotfiles/blob/master/.config/ags/widget/Settings.tsx"
click node_widgets "https://github.com/fromwau/dotfiles/tree/master/.config/ags/widget/components"
click node_ags_state "https://github.com/fromwau/dotfiles/blob/master/.config/ags/utils/state.ts"
click node_display_mode "https://github.com/fromwau/dotfiles/blob/master/.config/ags/utils/displayMode.ts"
click node_hyprstate "https://github.com/fromwau/dotfiles/blob/master/hyprstate/src/main.rs"
click node_walker "https://github.com/fromwau/dotfiles/tree/master/.config/anyrun"

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_ags_app,node_bar,node_settings,node_widgets,node_ags_state,node_display_mode,node_user,node_other_tools,node_launcher_user toneBlue
class node_hyprstate,node_state_file toneAmber
class node_walker toneMint
class node_hyprland,node_notify toneIndigo
```

## Components

### Desktop UI

- [AGS application](https://github.com/fromwau/dotfiles/blob/master/.config/ags/app.tsx): `.config/ags/app.tsx`
- [Bar](https://github.com/fromwau/dotfiles/blob/master/.config/ags/widget/Bar.tsx): `.config/ags/widget/Bar.tsx`
- [Settings UI](https://github.com/fromwau/dotfiles/blob/master/.config/ags/widget/Settings.tsx): `.config/ags/widget/Settings.tsx`
- [Status widgets](https://github.com/fromwau/dotfiles/tree/master/.config/ags/widget/components): `.config/ags/widget/components`
- [State monitor](https://github.com/fromwau/dotfiles/blob/master/.config/ags/utils/state.ts): `.config/ags/utils/state.ts`
- [Display mode](https://github.com/fromwau/dotfiles/blob/master/.config/ags/utils/displayMode.ts): `.config/ags/utils/displayMode.ts`

### Session State

- [hyprstate CLI](https://github.com/fromwau/dotfiles/blob/master/hyprstate/src/main.rs): `hyprstate/src/main.rs`
- **state.json**

### App Launcher

- [Walker configuration](https://github.com/fromwau/dotfiles/tree/master/.config/anyrun): `.config/anyrun`

### Other components

- **Desktop user**
- **Hyprland**
- **Desktop notifications**
- **Desktop state clients**
- **Launcher user**

## Connections

- Desktop user → AGS application: uses
- AGS application → Bar: renders
- AGS application → Settings UI: renders
- Bar → Status widgets: renders
- State monitor → state.json: watches
- State monitor → Bar: refreshes
- State monitor → Status widgets: refreshes
- Desktop state clients → hyprstate CLI: invokes
- hyprstate CLI → state.json: reads and writes (evidence: `hyprstate/src/main.rs`)
- hyprstate CLI → Hyprland: reloads (evidence: `hyprstate/src/main.rs`)
- hyprstate CLI → Desktop notifications: notifies (evidence: `hyprstate/src/main.rs`)
- Hyprland → state.json: reads on reload
- Launcher user → Walker configuration: launches
