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§

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§

AccessibilitySettings
Accessibility settings detected from the operating system.
AnimationMetrics
Animation-related preferences from the OS.
AudioMetrics
Audio-feedback preferences from the OS.
FocusVisuals
Focus ring / indicator visual style.
IconStyleOptions
Icon-specific styling options for accessibility and theming.
InputMetrics
Input interaction timing and distance thresholds from the OS.
LinuxCustomization
Linux-specific customisation settings.
SafeAreaInsets
Safe area insets for devices with notches, rounded corners, or sensor housings.
ScrollbarPreferences
OS-level scrollbar behaviour preferences.
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.
TextRenderingHints
Text rendering configuration from the OS.
TitlebarButtons
Which window control buttons are available in the titlebar.
TitlebarMetrics
Metrics for titlebar layout and window chrome.
VisualHints
Visual hints from the OS about how icons and decorations should be shown.

Enums§

DesktopEnvironment
Represents the detected Linux Desktop Environment.
FocusBehavior
Focus indicator behaviour (always visible vs keyboard-only).
Platform
Represents the detected platform.
ScrollbarTrackClick
What happens when clicking the scrollbar track area.
ScrollbarVisibility
When scrollbars should be shown (OS-level preference).
SubpixelType
Subpixel rendering layout for font smoothing.
SystemFontType
System font types that can be resolved at runtime based on OS settings.
Theme
The overall theme type.
TitlebarButtonSide
Which side of the titlebar the window control buttons are on.
ToolbarStyle
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.