slot

package
v0.0.0-...-e4b58e5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package slot provides multiple slots for a single module, allowing it to be moved between various positions on the bar. When used carefully, this can be useful for conveying limited information by re-ordering modules, but it has the potential to become too distracting if overused.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Slotter

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

Slotter provides the ability to display the output of a module into named slots, and allows changing the active slot at runtime to effectively move the module on the bar.

func New

func New(m bar.Module) *Slotter

New creates a slotter for the given module. The module is 'consumed' by this operation and should not be used except through slots created from the returned Slotter.

func (*Slotter) Activate

func (s *Slotter) Activate(slotName string)

Activate moves the module output to the named slot.

func (*Slotter) Slot

func (s *Slotter) Slot(name string) bar.Module

Slot creates a named slot for the module output.

Jump to

Keyboard shortcuts

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