Documentation
¶
Index ¶
- func ShouldUseColor(colorFlag string) bool
- func SortByPriority(signals []signal.View) []signal.View
- type ColorScheme
- type Formatter
- func (f *Formatter) ColorizeState(state string) string
- func (f *Formatter) FormatSession(s tmux.SessionInfo) string
- func (f *Formatter) FormatSignal(sig signal.View) string
- func (f *Formatter) FormatSignals(signals []signal.View) string
- func (f *Formatter) FormatWindow(w tmux.WindowInfo) string
- func (f *Formatter) FormatWindowWithSession(w tmux.WindowInfo) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ShouldUseColor ¶
ShouldUseColor determines if color output should be used. It respects the --color flag and NO_COLOR environment variable.
Types ¶
type ColorScheme ¶
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 ¶
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
FormatSignal formats a single signal as 'state: "title"' or just 'state' if no title.
func (*Formatter) FormatSignals ¶
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}"