Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InMultiplexer ¶
func InMultiplexer() bool
InMultiplexer returns true if running inside any terminal multiplexer.
func SupportsProgress ¶ added in v0.1.6
SupportsProgress returns true if the terminal supports OSC 9;4 progress bars. Supported by: Windows Terminal, Ghostty (1.2+), iTerm2 (3.6.6+), ConEmu, Mintty
func TmuxAllowPassthrough ¶ added in v0.1.1
func TmuxAllowPassthrough() string
TmuxAllowPassthrough checks if tmux allow-passthrough is enabled. Returns: "on", "off", "all", or empty string if unknown.
func TmuxSupportsPassthrough ¶ added in v0.1.1
func TmuxSupportsPassthrough() bool
TmuxSupportsPassthrough returns true if tmux version is 3.2 or higher.
func TmuxVersion ¶ added in v0.1.1
func TmuxVersion() string
TmuxVersion returns the tmux version string, or empty if not available.
Types ¶
type Capabilities ¶
type Capabilities struct {
Terminal Terminal `json:"terminal"`
Protocol Protocol `json:"protocol"`
SupportsTitle bool `json:"supports_title"`
SupportsUrgency bool `json:"supports_urgency"`
SupportsID bool `json:"supports_id"`
SupportsProgress bool `json:"supports_progress"`
InMultiplexer bool `json:"in_multiplexer"`
NativeAvailable bool `json:"native_available"`
}
Capabilities describes terminal notification capabilities.
func GetCapabilities ¶
func GetCapabilities(nativeAvailable bool) Capabilities
GetCapabilities returns the notification capabilities for the current environment.
type Protocol ¶
type Protocol string
Protocol represents an OSC notification protocol.
func SelectProtocol ¶
SelectProtocol returns the best OSC protocol for a terminal.
type Terminal ¶
type Terminal string
Terminal represents a detected terminal emulator.
const ( TerminalKitty Terminal = "kitty" TerminalITerm2 Terminal = "iterm2" TerminalWezTerm Terminal = "wezterm" TerminalGhostty Terminal = "ghostty" TerminalVTE Terminal = "vte" TerminalFoot Terminal = "foot" TerminalAlacritty Terminal = "alacritty" TerminalKonsole Terminal = "konsole" TerminalAppleTerminal Terminal = "apple-terminal" TerminalWindowsTerminal Terminal = "windows-terminal" TerminalVSCode Terminal = "vscode" TerminalHyper Terminal = "hyper" TerminalUnknown Terminal = "" )
func DetectTerminal ¶
func DetectTerminal() Terminal
DetectTerminal detects the current terminal emulator from environment variables.