desktop

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWorkspaces

func CreateWorkspaces() map[store.Location]*Workspace

Types

type Channels added in v2.5.0

type Channels struct {
	Event  chan string // Channel for events
	Action chan string // Channel for actions
}

type Handler

type Handler struct {
	Dragging bool        // Indicates pointer dragging event
	Source   interface{} // Stores moved/resized client
	Target   interface{} // Stores client/workspace
}

func (*Handler) Active added in v2.5.0

func (h *Handler) Active() bool

func (*Handler) Reset added in v2.5.0

func (h *Handler) Reset()

type Handlers added in v2.5.0

type Handlers struct {
	Timer        *time.Timer // Timer to handle delayed structure events
	ResizeClient *Handler    // Stores client for proportion change
	MoveClient   *Handler    // Stores client for tiling after move
	SwapClient   *Handler    // Stores clients for window swap
	SwapScreen   *Handler    // Stores client for screen swap
}

func (*Handlers) Active added in v2.5.2

func (h *Handlers) Active() bool

func (*Handlers) Reset added in v2.5.2

func (h *Handlers) Reset()

type Layout

type Layout interface {
	Reset()
	Apply()
	AddClient(c *store.Client)
	RemoveClient(c *store.Client)
	MakeMaster(c *store.Client)
	SwapClient(c1 *store.Client, c2 *store.Client)
	ActiveClient() *store.Client
	NextClient() *store.Client
	PreviousClient() *store.Client
	IncreaseMaster()
	DecreaseMaster()
	IncreaseSlave()
	DecreaseSlave()
	IncreaseProportion()
	DecreaseProportion()
	UpdateProportions(c *store.Client, d *store.Directions)
	GetManager() *store.Manager
	GetName() string
}

func CreateLayouts

func CreateLayouts(loc store.Location) []Layout

type Tracker

type Tracker struct {
	Clients    map[xproto.Window]*store.Client // List of tracked clients
	Workspaces map[store.Location]*Workspace   // List of workspaces per location
	Channels   *Channels                       // Helper for channel communication
	Handlers   *Handlers                       // Helper for event handlers

}

func CreateTracker

func CreateTracker() *Tracker

func (*Tracker) ActiveClient added in v2.5.2

func (tr *Tracker) ActiveClient() *store.Client

func (*Tracker) ActiveWorkspace

func (tr *Tracker) ActiveWorkspace() *Workspace

func (*Tracker) ClientAt added in v2.5.0

func (tr *Tracker) ClientAt(ws *Workspace, p common.Point) *store.Client

func (*Tracker) ClientWorkspace

func (tr *Tracker) ClientWorkspace(c *store.Client) *Workspace

func (*Tracker) Reset

func (tr *Tracker) Reset()

func (*Tracker) Restore added in v2.5.1

func (tr *Tracker) Restore(ws *Workspace, flag uint8)

func (*Tracker) Tile added in v2.5.0

func (tr *Tracker) Tile(ws *Workspace)

func (*Tracker) Update

func (tr *Tracker) Update()

func (*Tracker) WorkspaceAt added in v2.5.0

func (tr *Tracker) WorkspaceAt(desktop uint, screen uint) *Workspace

func (*Tracker) Write added in v2.4.0

func (tr *Tracker) Write()

type Workspace

type Workspace struct {
	Name     string         // Workspace location name
	Location store.Location // Desktop and screen location
	Layouts  []Layout       // List of available layouts
	Layout   uint           // Active layout index
	Tiling   bool           // Tiling is enabled
}

func (*Workspace) ActiveLayout

func (ws *Workspace) ActiveLayout() Layout

func (*Workspace) AddClient

func (ws *Workspace) AddClient(c *store.Client)

func (*Workspace) Cache added in v2.4.0

func (ws *Workspace) Cache() common.Cache[*Workspace]

func (*Workspace) CycleLayout

func (ws *Workspace) CycleLayout(dir int)

func (*Workspace) DisableTiling added in v2.5.1

func (ws *Workspace) DisableTiling()

func (*Workspace) EnableTiling added in v2.5.1

func (ws *Workspace) EnableTiling()

func (*Workspace) Read added in v2.4.0

func (ws *Workspace) Read() *Workspace

func (*Workspace) RemoveClient

func (ws *Workspace) RemoveClient(c *store.Client)

func (*Workspace) ResetLayouts added in v2.4.0

func (ws *Workspace) ResetLayouts()

func (*Workspace) Restore

func (ws *Workspace) Restore(flag uint8)

func (*Workspace) SetLayout

func (ws *Workspace) SetLayout(layout uint)

func (*Workspace) Tile

func (ws *Workspace) Tile()

func (*Workspace) TilingDisabled added in v2.5.1

func (ws *Workspace) TilingDisabled() bool

func (*Workspace) TilingEnabled

func (ws *Workspace) TilingEnabled() bool

func (*Workspace) VisibleClients added in v2.5.2

func (ws *Workspace) VisibleClients() []*store.Client

func (*Workspace) Write added in v2.4.0

func (ws *Workspace) Write()

Jump to

Keyboard shortcuts

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