Function copypasta_ext::display::is_x11
source · pub fn is_x11() -> bool
Expand description
Check whether we’re in an X11 environment.
This is a best effort, may be unreliable.
Checks the XDG_SESSION_TYPE
and DISPLAY
environment variables.
Always returns false on unsupported platforms such as Windows/macOS.
Available regardless of the x11-*
compiler feature flags.