watcher

package
v0.0.0-...-f0f5510 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Watcher

func Watcher(c config.Config, data chan<- I3Instruction)

Types

type I3Instruction

type I3Instruction struct {
	Data      string              `json:"-"`
	CMD       []types.I3Cmd       `json:"-"`
	Workspace string              `json:"-"`
	Marks     []MarkID            `json:"marks"`
	Layout    []LayoutInstruction `json:"layouts"`
}

func (I3Instruction) Run

func (i I3Instruction) Run() types.Result

type I3Store

type I3Store struct {
	Workspace string
	Mark      string
}

type LayoutInstruction

type LayoutInstruction struct {
	Mark string `json:"mark"`
	Size Rect   `json:"dimensions"`
}

func GetLayoutInstructions

func GetLayoutInstructions(node *i3.Node, i3inst I3Instruction) []LayoutInstruction

type MarkID

type MarkID struct {
	ID              string           `json:"id"`
	UUID            string           `json:"uuid"`
	Layout          types.LayoutType `json:"layout"`
	ParentNode      string           `json:"parent-node"`
	IsParent        bool             `json:"is-parent"`
	ContainerLayout types.LayoutType `json:"container-layout"`
	Depth           int              `json:"depth"`
	Workspace       string           `json:"workspace"`
}

func GetMarkIDs

func GetMarkIDs(ws string, node *i3.Node, depth int, seen map[i3.NodeID]MarkID, parent *MarkID) ([]MarkID, map[i3.NodeID]MarkID, bool)

func NewMarkIDFromNode

func NewMarkIDFromNode(ws string, node *i3.Node, d int, parent *MarkID) MarkID

type Rect

type Rect struct {
	Height int64 `json:"height"`
	Width  int64 `json:"width"`
}

Jump to

Keyboard shortcuts

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