Skip to main content

Module system

Module system 

Source
Expand description

Discovers system-native styling for colors, fonts, and other metrics.

This module provides a best-effort attempt to query the host operating system for its UI theme information. This is gated behind the io feature flag.

Application-Specific Ricing: By default (if the io feature is enabled), Azul will look for an application-specific stylesheet at ~/.config/azul/styles/<app_name>.css (or %APPDATA%\azul\styles\<app_name>.css on Windows). This allows end-users to override and “rice” any Azul application. This behavior can be disabled by setting the AZUL_DISABLE_RICING environment variable.

Linux Customization Easter Egg: Linux users can set the AZUL_SMOKE_AND_MIRRORS environment variable to force Azul to skip standard GNOME/KDE detection and prioritize discovery methods for “riced” desktops (like parsing Hyprland configs or pywal caches), leaning into the car “ricing” subculture where a flashy appearance is paramount.

Modules§

defaults
A collection of hard-coded system style defaults that mimic the appearance of various operating systems and desktop environments. These are used as a fallback when the “io” feature is disabled, ensuring deterministic styles for testing and environments where system calls are not desired.

Structs§

IconStyleOptions
Icon-specific styling options for accessibility and theming.
SystemColors
Common system colors used for UI elements.
SystemFonts
Common system font settings.
SystemMetrics
Common system metrics for UI element sizing and spacing.
SystemStyle
A unified collection of discovered system style properties.

Enums§

DesktopEnvironment
Represents the detected Linux Desktop Environment.
Platform
Represents the detected platform.
Theme
The overall theme type.

Functions§

detect_system_language
Detect the system language and return a BCP 47 language tag. Falls back to “en-US” if detection fails.