desktop

package
v0.0.0-...-2e55a2e Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWorkspaces

func CreateWorkspaces() map[Location]*Workspace

Types

type Handler

type Handler struct {
	Timer      *time.Timer    // Timer to handle delayed structure events
	SwapScreen *HandlerClient // Stores client for screen swap
}

type HandlerClient

type HandlerClient struct {
	Active bool          // Indicates active handler event
	Source *store.Client // Stores moving/resizing client
	Target *store.Client // Stores hovered client
}

type Layout

type Layout interface {
	AddClient(c *store.Client)
	RemoveClient(c *store.Client)
	GetManager() *store.Manager
}

type Location

type Location struct {
	ScreenNum uint // Workspace screen number
}

type Tracker

type Tracker struct {
	Clients    map[xproto.Window]*store.Client // List of clients that are being tracked
	Workspaces map[Location]*Workspace         // List of workspaces per location
	Action     chan string                     // Event channel for actions
	Handler    *Handler                        // Helper for event handlers
}

func CreateTracker

func CreateTracker(ws map[Location]*Workspace) *Tracker

func (*Tracker) ActiveWorkspace

func (tr *Tracker) ActiveWorkspace() *Workspace

func (*Tracker) ClientWorkspace

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

func (*Tracker) Reset

func (tr *Tracker) Reset()

func (*Tracker) Update

func (tr *Tracker) Update()

type Workspace

type Workspace struct {
	Location        Location // Desktop and screen location
	Layouts         []Layout // List of available layouts
	ActiveLayoutNum uint     // Active layout index
}

func (*Workspace) ActiveLayout

func (ws *Workspace) ActiveLayout() Layout

func (*Workspace) AddClient

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

func (*Workspace) RemoveClient

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

func (*Workspace) Restore

func (ws *Workspace) Restore(original bool)

Jump to

Keyboard shortcuts

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