output

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldUseColor

func ShouldUseColor(colorFlag string) bool

ShouldUseColor determines if color output should be used. It respects the --color flag and NO_COLOR environment variable.

func SortByPriority

func SortByPriority(signals []signal.View) []signal.View

SortByPriority sorts signals by state priority (waiting > idle/started > running).

Types

type ColorScheme

type ColorScheme struct {
	Waiting string
	Idle    string
	Started string
	Running string
	Reset   string
}

ColorScheme holds color codes for each state.

func NewColorScheme

func NewColorScheme(useColor bool) ColorScheme

NewColorScheme creates a ColorScheme based on whether colors are enabled.

type Formatter

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

Formatter handles formatting of scan output with optional color support.

func NewFormatter

func NewFormatter(scheme ColorScheme) *Formatter

NewFormatter creates a new Formatter with the given color scheme.

func (*Formatter) ColorizeState

func (f *Formatter) ColorizeState(state string) string

ColorizeState applies color to a state string.

func (*Formatter) FormatSession

func (f *Formatter) FormatSession(s tmux.SessionInfo) string

FormatSession formats a single session line.

func (*Formatter) FormatSignal added in v0.2.1

func (f *Formatter) FormatSignal(sig signal.View) string

FormatSignal formats a single signal as 'state: "title"' or just 'state' if no title.

func (*Formatter) FormatSignals

func (f *Formatter) FormatSignals(signals []signal.View) string

FormatSignals formats signals as 'state: "title", ...' sorted by priority.

func (*Formatter) FormatWindow

func (f *Formatter) FormatWindow(w tmux.WindowInfo) string

FormatWindow formats a single window line.

func (*Formatter) FormatWindowWithSession added in v0.1.2

func (f *Formatter) FormatWindowWithSession(w tmux.WindowInfo) string

FormatWindowWithSession formats a single window line with session name prefix. Output format: "{session}:{index}: {name} ({panes} panes) | {signals}"

Jump to

Keyboard shortcuts

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