i3

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2019 License: MIT Imports: 9 Imported by: 0

README

i3

A simple i3 status bar application

Impending Redesign

Goals

  • Make it simple to start. A string should be easy and free.
  • Make complicated things obvious. If you want to give us a channel of updates, we should use that.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a sad helper function

Types

type Barrer

type Barrer interface {
	Bar() []Block
}

type Block

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

A Block represents an individual "block" (per https://i3wm.org/docs/i3bar-protocol.html)

type Blocker

type Blocker interface {
	Block() Block
}

type BlockerFunc

type BlockerFunc func() Block

func (BlockerFunc) Block

func (b BlockerFunc) Block() Block

type Click

type Click struct {
	Name         string
	Instance     string
	X, Y, Button int
}

type Color

type Color struct {
	colorful.Color
}

func (*Color) MarshalJSON

func (c *Color) MarshalJSON() ([]byte, error)

type Handler

type Handler interface {
	Handle(c Click) bool
}

type HandlerFunc

type HandlerFunc func(Click)

func (HandlerFunc) Handle

func (chf HandlerFunc) Handle(c Click) bool

type Pager

type Pager struct {
	Bars []Barrer
	// contains filtered or unexported fields
}

func (*Pager) Bar

func (p *Pager) Bar() []Block

func (*Pager) Handle

func (p *Pager) Handle(c Click) bool

type Runner

type Runner struct {
	Frequency time.Duration
	Barrer    Barrer
	// contains filtered or unexported fields
}

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, in io.Reader, out io.Writer) error

type SFunc

type SFunc func() string

func (SFunc) String

func (s SFunc) String() string

type Static

type Static []interface{}

func (Static) Bar

func (s Static) Bar() []Block

Jump to

Keyboard shortcuts

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