Documentation
¶
Overview ¶
Package display provides display environment detection for all binaries Per AI.md PART 7: BINARY REQUIREMENTS - Display Environment Detection
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DisplayType ¶
type DisplayType string
DisplayType represents the type of display available
const ( DisplayTypeNone DisplayType = "none" DisplayTypeX11 DisplayType = "x11" DisplayTypeWayland DisplayType = "wayland" DisplayTypeWindows DisplayType = "windows" DisplayTypeMacOS DisplayType = "macos" )
type Env ¶
type Env struct {
// Display availability
HasDisplay bool // X11, Wayland, Windows, macOS display available
DisplayType DisplayType // Type of display: x11, wayland, windows, macos, none
// Terminal state
IsTerminal bool // stdout is a TTY
Cols int // Terminal columns (0 if no terminal)
Rows int // Terminal rows (0 if no terminal)
// Remote session detection
IsSSH bool // Running over SSH
IsMosh bool // Running over mosh
IsScreen bool // Running in GNU screen
IsTmux bool // Running in tmux
// Environment
OS string // Runtime OS (linux, darwin, windows, freebsd, etc.)
HasColor bool // Terminal supports colors
}
Env represents the detected display environment
func (Env) IsMultiplexed ¶
IsMultiplexed returns true if running in a terminal multiplexer
func (Env) TerminalSize ¶
TerminalSize returns the terminal size or default values
type Mode ¶
type Mode int
Mode represents the display mode of the application
const ( // ModeHeadless - No display, no TTY (daemon, service, cron) ModeHeadless Mode = iota // ModeCLI - Command provided or piped output ModeCLI // ModeTUI - Terminal available, interactive (TTY, SSH, mosh, screen, tmux) ModeTUI // ModeGUI - Native display available (X11, Wayland, Windows, macOS) ModeGUI )
func (Mode) IsInteractive ¶
IsInteractive returns true if running interactively
func (Mode) SupportsColors ¶
SupportsColors returns true if the mode supports colored output
func (Mode) SupportsInteraction ¶
SupportsInteraction returns true if the mode supports user interaction
func (Mode) SupportsRichOutput ¶
SupportsRichOutput returns true if the mode supports rich formatted output