# Global A **mobile companion** for [KDE Connect](https://kdeconnect.kde.org) / [Valent](https://valent.andyholmes.ca/) peers.

Global on Waydroid — paired with desktop, live channel, Ping / Unpair

Waydroid (x86_64) — egui + vidya shell, on-device KDE Connect peer

| Layer | Role | |--------|------| | **Gleam** (`global_app`, `dist_driver`) | Domain model + controller over Erlang distribution | | **Rust `dist-ui`** | Thin on-device UI (`egui` + [vidya](https://tangled.org/nandi.uk/vidya)) | | **erl_dist / ETF** | Wire between Gleam and the device UI | | **Peer discovery** | Host: Valent / GSConnect / kdeconnect-cli / LAN identity (`scripts/discover-peers`) | There is **no desktop GUI**. Global always runs on a device (Waydroid or Android over adb). Peer lists are **live** from the host’s Valent (or similar), not mocks. ## Run From the repo root (Waydroid session + NDK/SDK for APK builds): ```bash nix run .#global # or just run ``` That will: 1. `cargo apk build --target x86_64-linux-android --no-default-features` in `dist-ui/` 2. `adb install -r` the APK 3. Launch the app and run Gleam `dist_driver` → `ui@` Skip a rebuild: `GLOBAL_APK_SKIP_BUILD=1 nix run .#global` ## Layout | Path | | |------|--| | `src/` | Gleam domain (`global_app`) | | `dist_driver/` | Gleam controller (erl_dist → device) | | `dist-ui/` | Rust Android UI (egui + vidya) | | flake input `vidya` | Theme crate → [tangled.org/nandi.uk/vidya](https://tangled.org/nandi.uk/vidya) (staged at `.flake/vidya`) | | `scripts/global-run.sh` | Device pipeline used by `nix run .#global` | ### Vidya flake input ```bash # default: locked git+https://knot1.tangled.sh/nandi.uk/vidya nix run .#global # local checkout while hacking on the theme: nix run .#global --override-input vidya path:$HOME/code/vidya ``` Cargo depends on `path = "../.flake/vidya"`; `nix run` / `nix develop` stage the flake input there. ## Docs - [docs/dist-ui.md](docs/dist-ui.md) — protocol and device pipeline ## License MIT