layout

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout

type Layout struct {
	Nodes      Nodes
	Resolution xrandr.Size
	DPI        int
}

Layout stores all layout nodes

func New

func New(cfg config.Config, screens xrandr.Screens) (*Layout, error)

New creates a new layout based on the unserialized config file and current screen configuration

type Node

type Node struct {
	Monitor    xrandr.Monitor
	Resolution xrandr.Size
	Position   xrandr.Position
	Primary    bool
	Scale      float32
	Left       *Node
	Right      *Node
	Top        *Node
	Bottom     *Node
}

Node individual output from layout

func (Node) ID

func (n Node) ID() string

ID returns the node ID which is actually the monitor ID

type Nodes

type Nodes []*Node

Nodes list

Jump to

Keyboard shortcuts

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