$ show Aylur/astal
Astal is a collection of GObject-based libraries for building Wayland desktop shells and widgets on Linux. It provides reactive primitives (Variable, Binding) for declarative state management, along with wrappers for system services like NetworkManager, UPower, Bluetooth, MPRIS, audio (WirePlumber), system tray, and compositor-specific protocols (Hyprland, River, ext-workspace). The framework supports multiple frontend languages (GJS/TypeScript, Lua, Python) and both GTK3 and GTK4 via separate library targets. Examples demonstrate complete status bars and widget systems. The architecture is modular: core reactive abstractions live in `lang/gjs` and `lib/astal/io`, while domain-specific libraries under `lib/` expose GObject signals and properties for hardware and desktop services. Build system is Meson with Vala/C sources, GObject Introspection for bindings, and Nix flake for reproducible packaging. The documentation site uses VitePress. The project is actively maintained but in early development (v0.1.0 WIP). It shows strong engineering practice with well-structured reactive patterns and clean GObject usage, though there is duplication across language bindings and some deprecated APIs remain (e.g., AstalIO.Variable). The codebase is feature-rich and immediately usable for building custom Linux desktop environments.
The LLM identified 5 files worth highlighting for reuse:
A generic Binding class that wraps a GObject property or any subscribable into a reactive chain. Supports `.as()` for transformation, `.subscribe()` for side effects, and static `mergeBindings()` for combining multiple bindings. Independent of any UI framework, making it reusable across GJS projects for reactive data flow.
Variable class for state management with built-in polling (setInterval-style), subprocess watching (spawns a process and parses its output), and GObject signal observation. The `derive()` static method merges multiple Variables or Bindings. A clean, self-contained implementation of a reactive variable pattern that can be extracted for any GJS application.
A function that takes a GtkWidget class and returns a subclass with enhanced reactive support: automatic handle of `className`, `css`, `cursor`, `clickThrough` properties, plus a `hook()` method for connecting signals that auto-disconnect on widget destroy. Demonstrates advanced GObject subclassing and property injection patterns; reusable for any GJS+GTK project that wants declarative widget customization.
A standalone, self-contained argument parser library written in Vala. Provides `Command` class with subcommand support (`Flag`, `IntOpt`, `StringOpt`, `Hints`) and automatic help generation. Only dependency is GLib. Can be extracted and reused in any Vala application needing a CLI interface without external dependencies.
The core Vala implementation of the Variable reactive primitive used across Astal. Provides `AstalIO.Variable` with GObject properties, dynamic bindings via `bind()`, and methods like `poll()`, `watch()`, `observe()`. Well-structured with clear separation of concerns and signal emission. This is the foundation of the reactive system and can be extracted as a standalone Vala library.