config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Settings  Settings           `yaml:"settings"`
	Processes map[string]Process `yaml:"processes"`
}

Config is the top-level structure parsed from lazyproc.yaml.

func FromArgs

func FromArgs(commands []string, names []string, title string) (*Config, error)

FromArgs constructs a Config from CLI arguments.

func Load

func Load(path string) (*Config, error)

Load reads and parses a lazyproc.yaml config file from the given path.

func (*Config) HelpEnabled

func (c *Config) HelpEnabled() bool

HelpEnabled reports whether the help bar should be shown.

func (*Config) LabelsEnabled

func (c *Config) LabelsEnabled() bool

LabelsEnabled reports whether pane labels should be shown.

type HighlightRule

type HighlightRule struct {
	Pattern string `yaml:"pattern"`
	Color   string `yaml:"color"`
}

HighlightRule defines a regex pattern and its associated color for output highlighting.

type Process

type Process struct {
	Cmd       string          `yaml:"cmd"`
	Cwd       string          `yaml:"cwd"`
	DependsOn []string        `yaml:"depends_on"`
	ReadyWhen ReadyWhen       `yaml:"ready_when"`
	Highlight []HighlightRule `yaml:"highlight"`
	EnvFile   string          `yaml:"env_file"`
}

Process holds the configuration for a single managed process.

type ReadyWhen

type ReadyWhen struct {
	Stdout string `yaml:"stdout"`
}

ReadyWhen defines the condition under which a process is considered ready.

type Settings

type Settings struct {
	LogLimit int    `yaml:"log_limit"`
	Shell    string `yaml:"shell"`
	// ShowHelp controls whether the help bar is rendered at the bottom.
	// Defaults to true when omitted from config.
	ShowHelp *bool `yaml:"show_help"`
	// ShowLabels controls whether the "processes" / process-name label row
	// is rendered inside each pane. Defaults to true when omitted from config.
	ShowLabels *bool `yaml:"show_labels"`

	// ProcessListTitle is the title for the processes pane.
	ProcessListTitle string `yaml:"process_list_title"`
}

Settings holds global lazyproc settings.

Jump to

Keyboard shortcuts

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