terminals

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllDesktopsWindowLister

type AllDesktopsWindowLister interface {
	ListWindowsOnDisplayAllDesktops(displayID int) ([]platform.Window, error)
}

AllDesktopsWindowLister is an optional interface for backends that can list windows across all virtual desktops.

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector identifies terminal windows on the display

func NewDetector

func NewDetector(terminalClasses []string) *Detector

NewDetector creates a new terminal detector with the given terminal class list

func (*Detector) FindTerminals

func (d *Detector) FindTerminals(backend platform.Backend, displayID int, bounds platform.Rect) ([]TerminalWindow, error)

FindTerminals finds all terminal windows on the specified display within the given bounds. The bounds parameter is used to filter windows whose center falls inside that rectangle (typically the padded monitor area).

func (*Detector) FindTerminalsAllDesktops

func (d *Detector) FindTerminalsAllDesktops(backend platform.Backend, displayID int, bounds platform.Rect) ([]TerminalWindow, error)

FindTerminalsAllDesktops is like FindTerminals but lists windows across all virtual desktops. The backend must implement AllDesktopsWindowLister.

func (*Detector) UpdateTerminalClasses

func (d *Detector) UpdateTerminalClasses(terminalClasses []string)

UpdateTerminalClasses updates the terminal classes for detection

type TerminalWindow

type TerminalWindow struct {
	WindowID platform.WindowID
	Class    string
	Title    string
	X        int
	Y        int
	Width    int
	Height   int
}

TerminalWindow represents a detected terminal window

Jump to

Keyboard shortcuts

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