Skip to content

Allow customizing the text label on labeled widgets (e.g. "Model: ", "Ctx: ") #600

Description

@tough-griff

Many widgets put a hard-coded text label in front of their value when raw value is off: Model: , Ctx: , In: , Session: , Block: , Cost: , S:, and so on. The label can't be changed, only turned off completely with raw value, so a line either spends a lot of width on labels or has no labels at all:

Model: Opus 4.6 | Ctx Used: 42.1% | Session: 23.4% | Cost: $1.20
Opus 4.6 | 42.1% | 23.4% | $1.20

Something in between, like M Opus 4.6 | ctx 42.1% | 5h 23.4% | $1.20, currently needs a Custom Text widget merged in front of each raw-value widget. That's one extra widget per label, and it has to be kept in step with the value widget's colors and merge settings.

Glyph widgets already allow this: Git Branch, the JJ widgets, Git Staged, etc. let you replace or remove their prefix symbol with (g)lyph. Text labels have no equivalent.

Proposal: add a per-widget label override for widgets that render a text label:

  • An editor keybind opens a text field with the current label, showing the default (Tab restores it).
  • The override replaces the label verbatim, so the user decides the trailing space/colon. An empty label renders the value on its own, while raw value still works as before.
  • Widgets whose label depends on their mode (Ctx Used:/Ctx Left:, Block: vs Block in bar mode) use the one override in every mode.
  • It only applies while raw value is off, so the keybind can be hidden in raw value mode.
  • It's stored in metadata, so no settings schema change or migration is needed.

Glyph-prefixed widgets keep (g)lyph, and widgets whose "label" is really part of the value (Version's v, Git PR's PR/MR, Sandbox/Voice/Remote Control status formats) would be left out.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions