Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultSplit = "horizontal"
Variables ¶
View Source
var DefaultLayout = &LayoutNode{ Split: "horizontal", Panes: []*LayoutNode{ {Cmd: "claude", Size: "60%"}, {Cmd: "shell", Size: "20%"}, {Cmd: "shell", Size: "20%"}, }, }
Functions ¶
func DefaultConfigPath ¶
func DefaultConfigPath() string
Types ¶
type Config ¶
type Config struct {
Workspace string `yaml:"workspace,omitempty"`
Coordinator bool `yaml:"coordinator,omitempty"`
CoordinatorCmd string `yaml:"coordinator_cmd,omitempty"`
Defaults Defaults `yaml:"defaults"`
Projects []Project `yaml:"projects"`
}
func (*Config) EffectiveWorkspace ¶
EffectiveWorkspace returns the resolved workspace directory. Defaults to the user's home directory if not set.
type Defaults ¶
type Defaults struct {
Layout *LayoutSpec `yaml:"layout"`
Split string `yaml:"split"`
}
type LayoutNode ¶
type LayoutNode struct {
// Leaf fields
Cmd string `yaml:"cmd,omitempty"`
Size string `yaml:"size,omitempty"`
// Branch fields
Split string `yaml:"split,omitempty"`
Panes []*LayoutNode `yaml:"panes,omitempty"`
}
LayoutNode is a recursive layout tree node. A leaf has Cmd set; a branch has Split + Panes set.
func (*LayoutNode) IsLeaf ¶
func (n *LayoutNode) IsLeaf() bool
IsLeaf returns true if this node represents a single pane (has a command).
func (*LayoutNode) Leaves ¶
func (n *LayoutNode) Leaves() []*LayoutNode
Leaves returns all leaf nodes in depth-first order.
type LayoutSpec ¶
type LayoutSpec struct {
Root *LayoutNode
}
LayoutSpec wraps a LayoutNode pointer with custom YAML unmarshaling to support both the old flat list format and the new nested format.
func (LayoutSpec) MarshalYAML ¶
func (ls LayoutSpec) MarshalYAML() (interface{}, error)
func (*LayoutSpec) UnmarshalYAML ¶
func (ls *LayoutSpec) UnmarshalYAML(value *yaml.Node) error
type Project ¶
type Project struct {
Path string `yaml:"path"`
Name string `yaml:"name"`
Layout *LayoutSpec `yaml:"layout,omitempty"`
Split string `yaml:"split,omitempty"`
}
func (*Project) EffectiveLayout ¶
func (p *Project) EffectiveLayout(defaults Defaults) *LayoutNode
EffectiveLayout returns the layout tree for a project, falling back to defaults.
Click to show internal directories.
Click to hide internal directories.