backend

package
v0.0.0-...-aba6179 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMainLoopFor

func NewMainLoopFor(
	backend backend,
) (
	beforeCommandPing chan struct{},
	afterCommandPing chan struct{},
	quitPing chan struct{},
)

func NewX11Backend

func NewX11Backend() (backend, error)

Types

type Client

type Client interface {
	Id() ClientId

	Activate()

	Decorate()
	Undecorate()
	DecorDimensions() (width int, height int)

	Maximize()
	Unmaximize()

	MoveResize(x, y, width, height int)
	Restore()

	String() string
}

type ClientId

type ClientId interface {
	Equals(ClientId) bool
	String() string
}

type Keybinder

type Keybinder interface {
	Bind(keyStr string, callback func())
}

func NewKeybinderFor

func NewKeybinderFor(
	backend backend,
) Keybinder

type Prop

type Prop struct {
	Geom xrect.Rect
	// contains filtered or unexported fields
}

type Tracker

type Tracker[T workspace] interface {
	ParseClientId(string) (ClientId, error)

	Client(id ClientId) (client Client, exists bool)
	ActiveClient() (client Client, exists bool)

	CurentWorkspaceNum() uint
	WorkspaceCount() uint
	Workspace(index uint) T
	ActiveWorkspace() T

	WorkAreaDimensions(num uint) (x, y, width, height int)

	StartTracking()
	Sync()
}

func NewTrackerFor

func NewTrackerFor[T workspace](
	backend backend,
	classesToIgnore []string,
	workspaceFactory WorkspaceFactory[T],
) (
	Tracker[T],
	error,
)

type Workarea

type Workarea struct {
	X, Y          int
	Width, Height uint
}

type WorkspaceFactory

type WorkspaceFactory[T workspace] func(tracker Tracker[T], num uint) T

type X11Client

type X11Client struct {
	X *xgbutil.XUtil
	// contains filtered or unexported fields
}

func (X11Client) Activate

func (c X11Client) Activate()

Activate makes the client the currently active window

func (X11Client) DecorDimensions

func (c X11Client) DecorDimensions() (width int, height int)

DecorDimensions returns the width and height occupied by window decorations

func (X11Client) Decorate

func (c X11Client) Decorate()

func (X11Client) Id

func (c X11Client) Id() ClientId

func (X11Client) Maximize

func (c X11Client) Maximize()

func (X11Client) MoveResize

func (c X11Client) MoveResize(x, y, width, height int)

func (X11Client) Restore

func (c X11Client) Restore()

Restore resizes and decorates window to pre-tiling state.

func (X11Client) String

func (c X11Client) String() string

func (X11Client) Undecorate

func (c X11Client) Undecorate()

func (X11Client) Unmaximize

func (c X11Client) Unmaximize()

type X11ClientId

type X11ClientId xproto.Window

func (X11ClientId) Equals

func (id X11ClientId) Equals(otherId ClientId) bool

func (X11ClientId) String

func (id X11ClientId) String() string

type X11Keybinder

type X11Keybinder struct {
	X *xgbutil.XUtil
}

func (X11Keybinder) Bind

func (k X11Keybinder) Bind(keyStr string, f func())

type X11Tracker

type X11Tracker[T workspace] struct {
	X *xgbutil.XUtil
	// contains filtered or unexported fields
}

func (*X11Tracker[T]) ActiveClient

func (tr *X11Tracker[T]) ActiveClient() (client Client, exists bool)

func (*X11Tracker[T]) ActiveWorkspace

func (tr *X11Tracker[T]) ActiveWorkspace() T

func (*X11Tracker[T]) Client

func (tr *X11Tracker[T]) Client(id ClientId) (client Client, exists bool)

func (*X11Tracker[T]) CurentWorkspaceNum

func (tr *X11Tracker[T]) CurentWorkspaceNum() uint

func (*X11Tracker[T]) IsTracked

func (tr *X11Tracker[T]) IsTracked(wid xproto.Window) bool

func (*X11Tracker[T]) ParseClientId

func (tr *X11Tracker[T]) ParseClientId(str string) (ClientId, error)

func (*X11Tracker[T]) StartTracking

func (tr *X11Tracker[T]) StartTracking()

Public methods

func (*X11Tracker[T]) Sync

func (tr *X11Tracker[T]) Sync()

func (*X11Tracker[T]) WorkAreaDimensions

func (tr *X11Tracker[T]) WorkAreaDimensions(num uint) (x, y, width, height int)

WorkAreaDimensions returns the dimension of the requested workspace.

func (*X11Tracker[T]) Workspace

func (tr *X11Tracker[T]) Workspace(index uint) T

func (*X11Tracker[T]) WorkspaceCount

func (tr *X11Tracker[T]) WorkspaceCount() uint

Jump to

Keyboard shortcuts

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