Versions in this module Expand all Collapse all v0 v0.0.1 Oct 12, 2026 Changes in this version + const CompositorAwesome + const CompositorHyprland + const CompositorI3 + const CompositorKWin + const CompositorLabwc + const CompositorMarco + const CompositorMutter + const CompositorOpenbox + const CompositorRiver + const CompositorSway + const CompositorWayfire + const CompositorWeston + const CompositorXfwm + const ConfidenceHigh + const ConfidenceLow + const ConfidenceMedium + const DefaultProbeTimeout + const DefaultTimeout + const DesktopBudgie + const DesktopCOSMIC + const DesktopCinnamon + const DesktopGNOME + const DesktopKDE + const DesktopLXDE + const DesktopLXQt + const DesktopMATE + const DesktopPantheon + const DesktopXFCE + const DetectedDBus + const DetectedEnvironment + const DetectedLogind + const DetectedProcess + const DetectedSocket + const DetectedWayland + const DetectedX11EWMH + const ExtensionXWayland + const SectionAll + const SectionCompositor + const SectionDesktop + const SectionDisplay + const SectionGraphics + const SectionOS + const SectionPortal + const SectionSession + const SessionTypeMir + const SessionTypeTTY + const SessionTypeWayland + const SessionTypeX11 + const Unknown + var ErrInvalidRetryPolicy = errors.New("linuxdesktop: invalid connection retry policy") + var ErrNotLinux = errors.New("linuxdesktop: not running on Linux") + func IsHeadless() bool + func IsWayland() bool + func IsX11() bool + type CompositorInfo = CompositorInfoData[CompositorKind, DetectionConfidence, DetectionMethod] + func Compositor() (CompositorInfo, error) + type CompositorInfoData struct + Confidence ConfidenceType + DetectedBy MethodType + Kind KindType + Name string + Version string + Wayland bool + X11 bool + type CompositorKind string + type Config = ConfigData[Section] + type ConfigData struct + ConnectionRetry RetryPolicy + NativeGL bool + ProbeTimeout time.Duration + ProcessScan bool + Sections SectionsType + Timeout time.Duration + type DesktopEnvironment string + type DesktopInfo = DesktopInfoData[DesktopEnvironment] + func Desktop() (DesktopInfo, error) + type DesktopInfoData struct + CurrentDesktop string + CurrentDesktops []string + DesktopSession string + Environment DesktopType + Name string + SessionDesktop string + Version string + type DetectionConfidence string + type DetectionMethod string + type DisplayInfo = DisplayInfoData[X11Info, WaylandInfo, DisplayProtocol] + func Display() (DisplayInfo, error) + type DisplayInfoData struct + Protocol ProtocolType + Wayland *WaylandServerType + WaylandAvailable bool + WaylandDisplay string + X11 *XServerType + X11Available bool + X11Display string + XWayland bool + type DisplayProtocol string + type Environment = ... + func Detect() (*Environment, error) + func DetectContext(ctx context.Context, opts ...Option) (*Environment, error) + type EnvironmentData struct + Compositor CompositorType + Desktop DesktopType + Display DisplayType + Graphics GraphicsType + Headless bool + OS OSType + Portal PortalType + Session SessionType + type GPUInfo struct + DRMDevice string + DeviceID string + Discrete bool + Driver string + ID string + Integrated bool + Model string + PCIAddress string + RenderDevice string + Vendor string + VendorID string + type GraphicsInfo = GraphicsInfoData[OpenGLInfo, VulkanInfo, GPUInfo] + func Graphics() (GraphicsInfo, error) + type GraphicsInfoData struct + GPUs []GPUType + OpenGL OpenGLType + PrimaryGPU string + Vulkan VulkanType + type OSInfo struct + Architecture string + Hostname string + ID string + IDLike string + Kernel string + KernelRelease string + Name string + PrettyName string + Version string + VersionID string + func OS() (OSInfo, error) + type OpenGLInfo struct + Available bool + Renderer string + Vendor string + Version string + type Option func(*Config) + func WithConnectionRetry(policy RetryPolicy) Option + func WithOpenGL() Option + func WithProbeTimeout(d time.Duration) Option + func WithProcessScan() Option + func WithSections(s Section) Option + func WithTimeout(d time.Duration) Option + type PortalInfo struct + Available bool + Backend string + DesktopPortal bool + FileChooser bool + Inhibit bool + Notification bool + OpenURI bool + RemoteDesktop bool + ScreenCast bool + Screenshot bool + func Portal() (PortalInfo, error) + type RetryPolicy struct + InitialInterval time.Duration + MaxAttempts uint + MaxInterval time.Duration + type Section uint16 + type SessionInfo = SessionInfoData[SessionType] + func Session() (SessionInfo, error) + type SessionInfoData struct + Active bool + Desktop string + ID string + Name string + Remote bool + Seat string + Type SessionType + User string + VTNumber int + XDGSessionDesktop string + XDGSessionType string + type SessionType string + type VulkanInfo struct + Available bool + Version string + type WaylandGlobal struct + Interface string + Name uint32 + Version uint32 + type WaylandInfo = WaylandInfoData[WaylandGlobal] + type WaylandInfoData struct + Display string + Globals []GlobalType + SocketFD int + type X11Info struct + Display string + Extensions []string + ProtocolMajor int + ProtocolMinor int + Screen int + Vendor string + WindowManager string