i3bar

package
v0.0.4-0...-7259d3a Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: GPL-3.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventReader

func EventReader() chan uber.Event

func FilterRawEvent

func FilterRawEvent(in []byte) []byte

Types

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"`
}

incoming event

func NewEvent

func NewEvent() (r Event)
type Header struct {
	Version int8 `json:"version"`
	// not used yet
	// Stop_signal  uint8 `json:"stop_signal"`
	// Cont_signal  uint8 `json:"cont_signal"`
	ClickEvents bool `json:"click_events"`
}

func NewHeader

func NewHeader() (r Header)

func (Header) Encode

func (r Header) Encode() []byte

type Msg

type Msg struct {
	FullText            string `json:"full_text"`                       // full text, when shortening is not required
	ShortText           string `json:"short_text,omitempty"`            // shortened version of text to use when bar is full
	Color               string `json:"color,omitempty"`                 // color in #ffff00
	BorderColor         string `json:"border,omitempty"`                // color in #ffff00
	BackgroundColor     string `json:"background,omitempty"`            // color in #ffff00
	Markup              string `json:"markup,omitempty"`                // markup, pango or none (default
	MinWidth            string `json:"min_width,omitempty"`             // width in pixels, or string which will be measured for min_width
	Align               string `json:"align,omitempty"`                 // left/right/center align when size of text is smaller than minWidth
	Name                string `json:"name,omitempty"`                  // block name (ignored by i3bar, but will be returned in event)
	Instance            string `json:"instance,omitempty"`              // block instance (ignored by i3bar, but will be returned in event)
	Urgent              bool   `json:"urgent,omitempty"`                // urgent flag
	Separator           bool   `json:"separator,omitempty"`             // draw eparator
	SeparatorBlockWidth int16  `json:"separator_block_width,omitempty"` //number of pixe
}

http://i3wm.org/docs/i3bar-protocol.html

func CreateMsg

func CreateMsg(update uber.Update) (r Msg)

func NewMsg

func NewMsg() (r Msg)

func (Msg) Encode

func (r Msg) Encode() []byte

Jump to

Keyboard shortcuts

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