Expand description
OS detection: dark mode, reduced motion, DPI, desktop environment. OS detection: dark mode, reduced motion, DPI, desktop environment.
Structs§
- Detection
Context - Process-wide detection cache.
Enums§
- Linux
Desktop - Desktop environments recognized on Linux.
Functions§
- detect_
is_ dark - Detect whether the system is using a dark color scheme without caching.
- detect_
linux_ desktop - Detect the current Linux desktop environment.
- detect_
reduced_ motion - Detect whether the user prefers reduced motion without caching.
- invalidate_
caches - Reset all process-wide caches so the next call to
system_is_dark(),prefers_reduced_motion(), orsystem_icon_theme()re-queries the OS; a cached failure to detect the icon theme is cleared too. - parse_
linux_ desktop - Parse
XDG_CURRENT_DESKTOP(a colon-separated list) and return the recognized desktop environment. - prefers_
reduced_ motion - Query whether the user prefers reduced motion.
- system
- Return the process-wide default
DetectionContext. - system_
is_ dark - Detect whether the system is using a dark color scheme.