rules

package
v0.0.0-...-24dab48 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2015 License: MIT, MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Apply

type Apply int
const (
	SplitDirection Apply = iota
	SplitRatio
	MinWidth
	MaxWidth
	MinHeight
	MaxHeight
	Layout
	Layer
	IsPseudoTiled
	IsFloating
	IsLocked
	IsSticky
	IsPrivate
	IsBordered
	IsCentered
	IsManaged
	IsFocused
	ClientSelector
	DesktopSelector
	MonitorSelector
)

func (Apply) String

func (a Apply) String() string

type Component

type Component interface {
	Applies() Apply
	Implementr
}

type Consequence

type Consequence struct {
	Manage         bool
	Class          string
	Instance       string
	OnMonitor      selector.Selector
	OnDesktop      selector.Selector
	WithClient     selector.Selector
	LayoutState    string
	Layer          string
	SplitDirection string
	SplitRatio     float64
	MinWidth       uint16
	MaxWidth       uint16
	MinHeight      uint16
	MaxHeight      uint16
	Locked         bool
	Sticky         bool
	Center         bool
	Focus          bool
	Border         bool
}

func NewConsequence

func NewConsequence(class, instance string, rules ...Rule) *Consequence

type Implementr

type Implementr interface {
	String() string
	Uint16() uint16
	Float() float64
	Bool() bool
}

type Rule

type Rule interface {
	Cause() Component
	Effect() Component
	String() string
	Reuse() bool
}

type Ruler

type Ruler interface {
	Rule(...string) bool
	Unrule(...string) bool
	Applicable(string, string) *Consequence
	Pending() []Rule
}

func New

func New() Ruler

Jump to

Keyboard shortcuts

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