Hi π β first off, thanks for claude-powerline. We've vendored it (MIT) as the statusline engine for bastra-recall, and it's been a great base to build on.
We'd like to contribute a feature back, but wanted to check appetite before opening a PR.
The gap
Today the documented way to show custom / third-party output is to wrap the binary in a shell script. That works, but the custom bit then lives outside the powerline chain β it can't sit between your segments with its own color, icon, and position. There's no way for a background tool to surface a live status inline.
Proposal: a generic custom segment that renders a file
A background tool (CI watcher, test runner, deploy status, container health, β¦) writes a small JSON file; the segment reads it and renders it via a template. Deliberately file-based, not command-based β no arbitrary exec from config, just an fs.read per refresh, and it doesn't overlap with the existing shell-wrapping approach.
Sketch:
The template stays intentionally tiny β three tokens, no logic β so it's a display helper, not a DSL:
{field} β value from the JSON
{field?Β· text} β text only when field is truthy
{elapsed:tsField} β Date.now() β feed[tsField], formatted as a live duration
Our own use case (bastra-recall surfacing live recall activity) would just be one config of this β but the segment itself is tool-agnostic.
What we'd bring
The full PR β segment + provider, theme entries across all six themes, config/defaults wiring, docs, and tests β matching your existing segment conventions.
Would you be open to this? Happy to adjust the shape (naming, token set, file-vs-command) to whatever fits your design. And if you'd rather keep custom output external, totally understand β we'll keep it vendored on our side either way.
Hi π β first off, thanks for claude-powerline. We've vendored it (MIT) as the statusline engine for bastra-recall, and it's been a great base to build on.
We'd like to contribute a feature back, but wanted to check appetite before opening a PR.
The gap
Today the documented way to show custom / third-party output is to wrap the binary in a shell script. That works, but the custom bit then lives outside the powerline chain β it can't sit between your segments with its own color, icon, and position. There's no way for a background tool to surface a live status inline.
Proposal: a generic
customsegment that renders a fileA background tool (CI watcher, test runner, deploy status, container health, β¦) writes a small JSON file; the segment reads it and renders it via a template. Deliberately file-based, not command-based β no arbitrary exec from config, just an
fs.readper refresh, and it doesn't overlap with the existing shell-wrapping approach.Sketch:
The template stays intentionally tiny β three tokens, no logic β so it's a display helper, not a DSL:
{field}β value from the JSON{field?Β· text}βtextonly whenfieldis truthy{elapsed:tsField}βDate.now() β feed[tsField], formatted as a live durationOur own use case (bastra-recall surfacing live recall activity) would just be one config of this β but the segment itself is tool-agnostic.
What we'd bring
The full PR β segment + provider, theme entries across all six themes, config/defaults wiring, docs, and tests β matching your existing segment conventions.
Would you be open to this? Happy to adjust the shape (naming, token set, file-vs-command) to whatever fits your design. And if you'd rather keep custom output external, totally understand β we'll keep it vendored on our side either way.