zimple

package
v0.0.0-...-f0d73ec Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2024 License: MIT Imports: 12 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 {
	Command       string        `yaml:"command"`
	Icon          string        `yaml:"icon"`
	Enabled       string        `yaml:"enabled"`
	Args          []string      `yaml:"args"`
	UpdateSignals []int         `yaml:"update_signals"`
	Interval      time.Duration `yaml:"interval"`
	// contains filtered or unexported fields
}

Block represents a single block in the statusbar

func (*Block) NotifySignal

func (b *Block) NotifySignal(s syscall.Signal)

NotifySignal notifies the block that a signal has been received

func (*Block) Start

func (b *Block) Start(ctx context.Context) <-chan BlockOutput

Start starts executing the block and returns a channel where output can be listened to. The output channel will be closed when the context is canceled

type BlockOutput

type BlockOutput struct {
	Stdout string
	Stderr string
}

type Config

type Config struct {
	Settings Settings `yaml:"settings"`
	Blocks   []Block  `yaml:"blocks"`
}

Config represents all of the configuration options

func GetConfig

func GetConfig() (Config, error)

GetConfig reads, pareses and returns the configuration

type Settings

type Settings struct {
	Separator     string `yaml:"separator"`
	WriteToStdout bool   `yaml:"write_to_stdout"`
}

Jump to

Keyboard shortcuts

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