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§
- apple_
fonts - Apple system font family names for font fallback chains.
- 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.
- linux_
fonts - Linux/GTK common font family names.
- windows_
fonts - Windows system font family names.
Structs§
- Accessibility
Settings - Accessibility settings detected from the operating system.
- Animation
Metrics - Animation-related preferences from the OS.
- Audio
Metrics - Audio-feedback preferences from the OS.
- Focus
Visuals - Focus ring / indicator visual style.
- Icon
Style Options - Icon-specific styling options for accessibility and theming.
- Input
Metrics - Input interaction timing and distance thresholds from the OS.
- Linux
Customization - Linux-specific customisation settings.
- Safe
Area Insets - Safe area insets for devices with notches, rounded corners, or sensor housings.
- Scrollbar
Preferences - OS-level scrollbar behaviour preferences.
- System
Colors - Common system colors used for UI elements.
- System
Fonts - Common system font settings.
- System
Metrics - Common system metrics for UI element sizing and spacing.
- System
Style - A unified collection of discovered system style properties.
- Text
Rendering Hints - Text rendering configuration from the OS.
- Titlebar
Buttons - Which window control buttons are available in the titlebar.
- Titlebar
Metrics - Metrics for titlebar layout and window chrome.
- Visual
Hints - Visual hints from the OS about how icons and decorations should be shown.
Enums§
- Desktop
Environment - Represents the detected Linux Desktop Environment.
- Focus
Behavior - Focus indicator behaviour (always visible vs keyboard-only).
- Platform
- Represents the detected platform.
- Scrollbar
Track Click - What happens when clicking the scrollbar track area.
- Scrollbar
Visibility - When scrollbars should be shown (OS-level preference).
- Subpixel
Type - Subpixel rendering layout for font smoothing.
- System
Font Type - System font types that can be resolved at runtime based on OS settings.
- Theme
- The overall theme type.
- Titlebar
Button Side - Which side of the titlebar the window control buttons are on.
- Toolbar
Style - Toolbar display style (icons, text, or both).
Functions§
- detect_
linux_ desktop_ env - Detect Linux desktop environment from environment variables
- detect_
system_ language - Detect the system language and return a BCP 47 language tag. Falls back to “en-US” if detection fails.