rules

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package rules classifies desktop and compositor evidence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compositor

func Compositor(sig *domain.Signals) domain.CompositorInfo

Compositor walks the detection ladder and returns the first answer it reaches, along with the method and confidence that produced it.

func Desktop

func Desktop(env *domain.Env) domain.DesktopInfo

Desktop identifies the desktop environment from the XDG variables.

func Headless

func Headless(waylandAvailable, x11Available bool) bool

Headless reports whether there is no display server to draw on.

func IsCompositorProcess

func IsCompositorProcess(name string) bool

IsCompositorProcess reports whether a /proc comm value could name a compositor. The process scanner uses it to discard the several hundred uninteresting processes before paying to verify ownership of the rest.

func Protocol

func Protocol(
	sessionType domain.SessionType,
	waylandAvailable, x11Available bool,
) domain.DisplayProtocol

Protocol reports which display protocol a client should actually use. A reachable server beats what $XDG_SESSION_TYPE claims, because a session type the client cannot connect to is of no use to it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL