i3line

package
v0.0.0-...-cbe7ee1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Name                string `json:"name"`
	Instance            string `json:"instance"`
	FullText            string `json:"full_text"`
	ShortText           string `json:"short_text"`
	Color               string `json:"color"`
	Background          string `json:"background"`
	Border              string `json:"border"`
	MinWidth            int    `json:"min_width"`
	Align               string `json:"align"`
	Urgent              bool   `json:"urgent"`
	Separator           bool   `json:"separator"`
	SeparatorBlockWidth int    `json:"separator_block_width"`
	Markup              string `json:"markup"`
}

func NewColorBlock

func NewColorBlock(text, color string) Block

func NewDefaultBlock

func NewDefaultBlock(text string) Block

func NewErrorBlock

func NewErrorBlock() Block

func NewPangoBlock

func NewPangoBlock(text string) Block

type BlockManager

type BlockManager struct {
	// contains filtered or unexported fields
}

func (*BlockManager) AddModule

func (m *BlockManager) AddModule(module BlockModule)

func (*BlockManager) Close

func (m *BlockManager) Close()

func (*BlockManager) Init

func (m *BlockManager) Init()

func (*BlockManager) Run

func (m *BlockManager) Run(refreshRate time.Duration)

type BlockModule

type BlockModule interface {
	GenBlock() Block
	OnClick(Event) bool
}

type Event

type Event struct {
	Name     string `json: "name"`
	Instance string `json: "instance"`
	Button   int    `json: "button"`
	X        int    `json: "x"`
	Y        int    `json: "y"`
}

Jump to

Keyboard shortcuts

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