desktop

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 16 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 Handler

type Handler struct {
	Timer        *time.Timer    // Timer to handle delayed structure events
	ResizeClient *HandlerClient // Stores client for proportion change
	MoveClient   *HandlerClient // Stores client for tiling after move
	SwapClient   *HandlerClient // Stores clients for window swap
	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 {
	Reset()
	Apply()
	AddClient(c *store.Client)
	RemoveClient(c *store.Client)
	MakeMaster(c *store.Client)
	SwapClient(c1 *store.Client, c2 *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 clients that are being tracked
	Workspaces map[store.Location]*Workspace   // List of workspaces per location
	Action     chan string                     // Event channel for actions
	Handler    *Handler                        // Helper for event handlers
}

func CreateTracker

func CreateTracker() *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()

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
	TilingEnabled   bool           // Tiling is enabled or not
	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) Cache added in v2.4.0

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

func (*Workspace) CycleLayout

func (ws *Workspace) CycleLayout(step int)

func (*Workspace) Disable

func (ws *Workspace) Disable()

func (*Workspace) Disabled

func (ws *Workspace) Disabled() bool

func (*Workspace) Enable

func (ws *Workspace) Enable()

func (*Workspace) Enabled

func (ws *Workspace) Enabled() bool

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(layoutNum uint)

func (*Workspace) Tile

func (ws *Workspace) Tile()

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