targets.shell: Shell-Tooling Targets#

Zsh prompt colors, lsd, dircolors, fzf, starship, delta, btop.

Follows irix.targets.terminals.KittyTarget’s shape (module-level row tables, Target.anchor for every resolved value, a two-line generated-file header, live deploy_dest). Six of the seven targets here (zshcolors, lsd, fzf, starship, delta, btop) anchor through the shell entry of irix/data/anchors/shell.yaml, same as terminals.yaml does for kitty. dircolors is the deliberate exception: it compiles a pre-existing, non-artifact, per-extension spec file (out/shell/dircolors.yaml) directly at render time rather than duplicating that file’s ~60 finer-grained entries into the anchor table.

lsd regenerates out/shell/lsd/colors.yaml, correcting 15 of its 32 # hue-role annotated entries that had drifted to a neighboring rung’s hex after a later palette move.

Shell-tooling targets: zsh prompt colors, lsd, dircolors, fzf, starship, delta, btop.

Follows irix.targets.terminals.KittyTarget’s shape (module-level row tables, Target.anchor for every resolved value, a two-line generated-file header, live deploy_dest). Six of the seven targets here (zshcolors, lsd, fzf, starship, delta, btop) anchor through the shell entry of irix/data/anchors/shell.yaml, same as terminals.yaml does for kitty. dircolors is the deliberate exception: it compiles a pre-existing, non-artifact, per-extension spec file (out/shell/dircolors.yaml) directly at render time rather than duplicating that file’s ~60 finer-grained entries into the anchor table – see DircolorsTarget’s docstring.

lsd regenerates out/shell/lsd/colors.yaml, correcting 15 of its 32 # hue-role annotated entries that had drifted to a neighboring rung’s hex after a later palette move – see LsdTarget’s docstring and anchors/shell.yaml’s header comment for the derivation note.

class irix.targets.shell.ZshColorsTarget(*, name: str = 'zshcolors', family: str = 'shell')#

Bases: Target

The zsh prompt color fragment robbd.zsh-theme sources, rendered for both modes.

Absorbs the original scripts/generate_shell_colors.py’s rendering logic (same ALL_COLORS var table, same local var="value"  # hue-shade line shape); that script is now a thin deprecated wrapper around this target’s dark render (see its module docstring). Dark-mode body output is byte-identical to the old script’s, apart from the two-line generated-file header (the old script’s header named itself and its own regenerate command; this target’s header names the anchor table and mode instead) and the old script’s now-redundant # Dark Backgrounds (shape1 shade): label, which is dropped here – it described only the first four (NEUTRAL) rows, not the SYSTEM/ SEMANTIC/GIT rows below it, and does not generalize to light mode.

Generate-only (deploy_dest is Target’s default None): the operator’s zsh startup still consumes the legacy wrapper’s admin-tree copy, not this target’s out/ artifact.

render(mode: Mode) → dict[str, str]#

Render the zsh color fragment for mode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.LsdTarget(*, name: str = 'lsd', family: str = 'shell')#

Bases: Target

lsd’s colors.yaml custom theme, regenerated from anchors/shell.yaml’s lsd table.

The original hand-authored out/shell/lsd/colors.yaml carried its intended role table as trailing # hue-role comments, but 15 of its 32 annotated entries had drifted to hold a neighboring rung’s hex after a later palette move – e.g. permission.acl was annotated cyan-text2 but held cyan-text1’s hex. Those comments, not the stale hexes beside them, are what anchors/shell.yaml’s lsd table transcribes; every value below is resolved fresh from that table on every render, so a role’s hex and its trailing comment can never disagree the way the old file’s could.

render(mode: Mode) → dict[str, str]#

Render lsd’s colors.yaml for mode, preserving the file’s exact tree shape.

deploy_dest(relpath: str) → Path | None#

Return $XDG_CONFIG_HOME/lsd/<basename> for either rendered file.

Both colors.yaml and colors-light.yaml deploy side by side; lsd’s own config.yaml (color.theme: custom) names whichever one is live.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.DircolorsTarget(*, name: str = 'dircolors', family: str = 'shell')#

Bases: Target

Compiles out/shell/dircolors.yaml’s symbolic spec into a real GNU dircolors config.

Unlike every other target in this family, this target’s role table is not anchors/shell.yaml – it is out/shell/dircolors.yaml itself: a pre-existing, per-extension spec (codes + ~60 extensions + files + dirs) too fine-grained to usefully centralize, and a file this target reads but never writes (it stays the tracked source, not a generated artifact – the registry does not delete it).

Each entry is 'hue-shade [BOLD]'; BOLD prefixes the SGR sequence with 01;. mh (MULTIHARDLINK) has no value in the source spec (mh: with nothing after the colon) and is omitted rather than emitted as an empty, malformed SGR line – GNU ls falls back to its own built-in default for any code that is simply absent. files: and dirs: entries render as *name glob patterns (fnmatch against the full filename, so e.g. *LICENSE also matches MY-LICENSE); GNU ls only ever applies pattern entries – extensions and globs alike – to non-directory files, so the dirs: entries are inert under stock GNU ls/dircolors and are carried through only for other consumers (eza, lsd) that do support directory-name patterns.

Generate-only (deploy_dest is Target’s default None).

render(mode: Mode) → dict[str, str]#

Compile the spec for mode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.FzfTarget(*, name: str = 'fzf', family: str = 'shell')#

Bases: Target

fzf’s FZF_DEFAULT_OPTS --color export, matched to the kitty terminal palette.

Neutrals (bg/fg/bg+/fg+/header) are slate, mirroring terminals.yaml’s kitty entry; accents (hl/hl+/info/prompt/pointer/marker/spinner) reuse kitty’s cyan/purple/jade/magma/amber/indigo ANSI role hues so fzf reads as part of the same terminal rather than a separately-themed overlay.

Generate-only (deploy_dest is Target’s default None).

render(mode: Mode) → dict[str, str]#

Render the fzf color export for mode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.StarshipTarget(*, name: str = 'starship', family: str = 'shell')#

Bases: Target

A starship [palettes.irix] / [palettes.irix-light] table naming every hue.

Each hue gets its sign1 (saturated accent) and text1 (readable-on-background) rungs – the two rungs starship modules actually reach for – plus three slate neutral roles (bg/fg/muted). Dark renders section [palettes.irix], light renders [palettes.irix-light], so both fragments can be pasted into one starship.toml and switched at runtime via the top-level palette key.

Generate-only (deploy_dest is Target’s default None).

render(mode: Mode) → dict[str, str]#

Render the starship palette table for mode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.DeltaTarget(*, name: str = 'delta', family: str = 'shell')#

Bases: Target

A [delta] gitconfig section: jade-tinted additions, magma-tinted deletions.

Deliberately syntax-theme-free – no syntax-theme =, no bare syntax keyword in plus-style/minus-style – so delta’s own syntax highlighting is left untouched; only the diff-semantic colors (added/removed backgrounds, line numbers, file/hunk headers) come from the palette.

Generate-only (deploy_dest is Target’s default None).

render(mode: Mode) → dict[str, str]#

Render the delta gitconfig fragment for mode.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class irix.targets.shell.BtopTarget(*, name: str = 'btop', family: str = 'shell')#

Bases: Target

A btop theme[key]="#hex" file: boxes/text in slate, gradients from chamber ramps.

temp/cpu are cross-hue jade -> amber -> magma ramps (green -> yellow -> red severity – the same semantic git-status uses – at sign1 and text1 rungs respectively so the two gradients don’t collide value-for-value); free/cached/ available/used/download/upload are monochrome line2 -> sign1 -> text1 ramps within one hue each (jade/cyan/amber/magma/cyan/indigo). Process pausing and following use magma/indigo/purple banner backgrounds with slate-text2 text.

render(mode: Mode) → dict[str, str]#

Render the btop theme file for mode.

deploy_dest(relpath: str) → Path | None#

Return $XDG_CONFIG_HOME/btop/themes/<basename> for either rendered file.

model_config = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].