Index | Files

package slot

import ""

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.


Package Files


type Slotter Uses

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 Uses

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 Uses

func (s *Slotter) Activate(slotName string)

Activate moves the module output to the named slot.

func (*Slotter) Slot Uses

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

Slot creates a named slot for the module output.

Package slot imports 4 packages (graph). Updated 2019-01-22. Refresh now. Tools for package owners.