widgets

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatteryMonitor

type BatteryMonitor struct {
	UEventFile        string       `yaml:"ueventFile"`
	Format            string       `yaml:"format"`
	StatusIcons       string       `yaml:"statusIcons"`
	ChargingIcons     string       `yaml:"chargingIcons"`
	DischargingIcons  string       `yaml:"dischargingIcons"`
	StatusFull        string       `yaml:"statusFull"`
	StatusNotCharging string       `yaml:"statusNotCharging"`
	StatusCharging    string       `yaml:"statusCharging"`
	StatusDischarging string       `yaml:"statusDischarging"`
	Colors            string       `yaml:"colors"`
	CriticalLevel     int          `yaml:"criticalLevel"`
	Notification      notification `yaml:"notification,inline"`
	// contains filtered or unexported fields
}

func (*BatteryMonitor) Run

func (w *BatteryMonitor) Run(ctx context.Context, update statusbar.UpdateFunc)

func (*BatteryMonitor) SetLogger

func (w *BatteryMonitor) SetLogger(l *slog.Logger)

type Colors

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

func ParseColors

func ParseColors(spec string) (Colors, error)

func (Colors) Get

func (c Colors) Get(f float64) string

type DateTime

type DateTime struct {
	Format string `yaml:"format"`
	// contains filtered or unexported fields
}

func (*DateTime) Run

func (w *DateTime) Run(ctx context.Context, fn statusbar.UpdateFunc)

func (*DateTime) SetLogger

func (w *DateTime) SetLogger(l *slog.Logger)

type ExternalProgram

type ExternalProgram struct {
	Command string `yaml:"command"`
	// contains filtered or unexported fields
}

func (*ExternalProgram) Event

func (p *ExternalProgram) Event(ev statusbar.Event)

func (*ExternalProgram) Run

func (p *ExternalProgram) Run(ctx context.Context, update statusbar.UpdateFunc)

func (*ExternalProgram) SetLogger

func (w *ExternalProgram) SetLogger(l *slog.Logger)

type Format

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

func ParseFormat

func ParseFormat(format string, vars ...string) Format

func (*Format) Format

func (f *Format) Format(args ...any) string

type SystemMonitor

type SystemMonitor struct {
	Format string `yaml:"format"`
	// contains filtered or unexported fields
}

func (*SystemMonitor) Run

func (*SystemMonitor) SetLogger

func (w *SystemMonitor) SetLogger(l *slog.Logger)

type TemperatureMonitor

type TemperatureMonitor struct {
	Format    string `yaml:"format"`
	TempInput string `yaml:"tempInput"`
	FanInput  string `yaml:"fanInput"`
	// contains filtered or unexported fields
}

func (*TemperatureMonitor) Run

func (*TemperatureMonitor) SetLogger

func (w *TemperatureMonitor) SetLogger(l *slog.Logger)

type Volume

type Volume struct {
	Format   string `yaml:"format"`
	Icon     string `yaml:"icon"`
	MuteIcon string `yaml:"muteIcon"`

	VolMonCmd         string `yaml:"volMonCommand"`
	ScrollDownCmd     string `yaml:"scrollDownCommand"`
	ScrollUpCmd       string `yaml:"scrollUpCommand"`
	RightClickCommand string `yaml:"rightClickCommand"`
	LeftClickCommand  string `yaml:"leftClickCommand"`
	// contains filtered or unexported fields
}

func (*Volume) Event

func (w *Volume) Event(ev statusbar.Event)

func (*Volume) Run

func (w *Volume) Run(ctx context.Context, update statusbar.UpdateFunc)

func (*Volume) SetLogger

func (w *Volume) SetLogger(l *slog.Logger)

type Window

type Window struct {
	TitlePrefix   string   `yaml:"titlePrefix"`
	MaxTitleLen   int      `yaml:"maxTitleLength"`
	Ellipsis      string   `yaml:"ellipsis"`
	ExcludeAppIDs []string `yaml:"excludeAppIDs"`
	// contains filtered or unexported fields
}

func (*Window) HandleEvent

func (w *Window) HandleEvent(ev swayipc.Event)

func (*Window) Run

func (w *Window) Run(ctx context.Context, update statusbar.UpdateFunc)

func (*Window) SetLogger

func (w *Window) SetLogger(l *slog.Logger)

Jump to

Keyboard shortcuts

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