targets.terminals: Terminal-Emulator Targets#

KittyTarget is the family’s reference implementation: it renders kitty’s flat key value config format for both modes from the kitty entry in irix/data/anchors/terminals.yaml. That entry is a byte-for-byte fidelity match: every hex value in the original hand-authored out/terminals/kitty.conf resolved to exactly one address in irix.data.irix-dark.yaml, so no literal '#hex' anchors were needed – the whole file derives from named addresses, and light mode is the same addresses resolved through Palette.light.

This module adds five more targets to the family, imitating KittyTarget’s shape (module-level row tables, Target.anchor for every resolved value, a generated-file header, deploy_dest computed live from XDG env vars):

  • AlacrittyTarget and WarpTarget are fidelity matches against pre-existing hand-authored artifacts.

  • GhosttyTarget and TmuxTarget are new targets with no prior artifact, reusing kitty’s own ANSI mapping so the operator’s primary-terminal look carries over.

  • Xterm256Target replaces an abandoned, mostly-empty artifact with a systematic 256-slot dump of the whole Irix palette.

Terminal-emulator targets: KittyTarget is the family’s reference implementation.

KittyTarget renders kitty’s flat key value config format for both modes from the kitty entry in irix/data/anchors/terminals.yaml. That entry is a byte-for-byte fidelity match: every hex value in the original hand-authored out/terminals/kitty.conf resolved to exactly one address in irix.data.irix-dark.yaml (verified by direct grep against the palette file), so no literal '#hex' anchors were needed – the whole file derives from named addresses, and light mode is the same addresses resolved through Palette.light.

This module adds five more targets to the family, imitating KittyTarget’s shape (module- level row tables, Target.anchor for every resolved value, a generated-file header, deploy_dest computed live from XDG env vars): AlacrittyTarget and WarpTarget are fidelity matches against pre-existing hand-authored artifacts (see their docstrings for the verification notes); GhosttyTarget and TmuxTarget are new targets with no prior artifact, reusing kitty’s own ANSI mapping so the operator’s primary-terminal look carries over; Xterm256Target replaces an abandoned, mostly-empty artifact with a systematic 256-slot dump of the whole Irix palette.

class irix.targets.terminals.KittyTarget(*, name: str = 'kitty', family: str = 'terminals')#

Bases: Target

The kitty terminal color config, rendered for both modes from one anchor table.

Reference implementation for the irix.targets protocol: subsequent target families should follow this shape (module-level row tables, Target.anchor for every resolved value, a generated-file header, deploy_dest computed live from XDG env vars so tests can monkeypatch HOME/XDG_CONFIG_HOME per-call rather than at import time).

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

Render kitty’s flat config for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

deploy_dest(relpath: str) → Path | None#

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

Resolved live from the environment on every call (never cached at import time) so that tests can monkeypatch HOME/XDG_CONFIG_HOME per-call and see the deploy destination move with them.

Parameters:

relpath – One of render’s result keys.

model_config = {}#

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

class irix.targets.terminals.AlacrittyTarget(*, name: str = 'alacritty', family: str = 'terminals')#

Bases: Target

Alacritty’s nested-TOML color config, rendered for both modes from one anchor table.

Fidelity match: every one of the original hand-authored out/terminals/alacritty.toml’s 29 hex fields resolved to exactly one address in irix.data.irix-dark.yaml – sage neutrals (not kitty’s slate), a gold cursor, a sand footer bar, and the shared magma/green/amber/indigo/purple/cyan ANSI accents – so no literal '#hex' anchors were needed here either. Non-color structure (font, cursor shape, keybindings, …) is a static template; only the 29 color fields and the cosmetic decorations_theme_variant hint vary by mode.

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

Render Alacritty’s TOML config for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

deploy_dest(relpath: str) → Path | None#

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

Parameters:

relpath – One of render’s result keys.

model_config = {}#

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

class irix.targets.terminals.GhosttyTarget(*, name: str = 'ghostty', family: str = 'terminals')#

Bases: Target

Ghostty’s key = value theme-file format, rendered for both modes.

New target: no prior hand-authored artifact to match, so it reuses kitty’s own ANSI mapping (_ANSI_ROLES, same sixteen irix/data/anchors/terminals.yaml addresses) so the operator’s primary-terminal look carries over. cursor_color/ cursor_text and the selection pair have no kitty-anchor equivalent to copy – they extend the same slate-neutral family: cursor mirrors kitty’s own unset-cursor default (foreground-on-background), and selection reuses the slate-bound2/text2 pair kitty already established for “highlighted” panels (active_tab_background/_foreground).

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

Render Ghostty’s theme file for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

deploy_dest(relpath: str) → Path | None#

Return $XDG_CONFIG_HOME/ghostty/themes/irix-{mode} for either rendered file.

Ghostty’s own theme-directory convention (github.com/ghostty-org/ghostty list-themes docs) is $XDG_CONFIG_HOME/ghostty/themes/<name>, extension-free – unlike render’s out/ filenames, so the mode is recovered from the relpath’s -light suffix rather than reusing its basename verbatim.

Parameters:

relpath – One of render’s result keys.

model_config = {}#

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

class irix.targets.terminals.TmuxTarget(*, name: str = 'tmux', family: str = 'terminals')#

Bases: Target

A sourceable tmux config snippet, rendered for both modes.

New target, generate-only (no deploy_dest) – operators source-file it from their own .tmux.conf rather than have it installed under a fixed name. Slate neutrals carry the base status/window look; cyan is the shared “accent” hue (matches WarpTarget’s accent and kitty’s mark2, so active-pane/copy-mode highlights read as the same accent across every irix target); amber (kitty’s ANSI yellow) marks message-style since tmux command-line messages are conventionally the most attention-grabbing style in the config.

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

Render the tmux config snippet for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

model_config = {}#

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

class irix.targets.terminals.WarpTarget(*, name: str = 'warp', family: str = 'terminals')#

Bases: Target

Warp’s YAML theme format, rendered for both modes from one anchor table.

Fidelity match: every hex value in the original hand-authored out/terminals/irix-dark-warp-theme.yaml is identical to kitty’s own slate+cyan- accent mapping – same irix/data/irix-dark.yaml addresses, warp-local role names – so no literal '#hex' anchors were needed. deploy_dest repairs the previous (removed) Deployer.warp action, which pointed at a nonexistent .toml file; see irix.deploy’s module-level note.

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

Render Warp’s YAML theme for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

deploy_dest(relpath: str) → Path | None#

Return $XDG_DATA_HOME/warp-terminal/themes/irix-{mode}.yaml.

Warp’s theme directory is under XDG_DATA_HOME (not XDG_CONFIG_HOME – Warp is a data-dir application), and its file naming (irix-{mode}.yaml) differs from render’s out/ filenames, so the mode is recovered from the relpath’s -light marker rather than reusing its basename verbatim.

Parameters:

relpath – One of render’s result keys.

model_config = {}#

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

class irix.targets.terminals.Xterm256Target(*, name: str = 'xterm256', family: str = 'terminals')#

Bases: Target

A full 256-slot xterm-palette dump, rendered for both modes. Generate-only.

Replaces the abandoned out/terminals/irix-xterm256.toml (6 real rows, then 234 empty-string placeholders). Slots 0-15 curate kitty’s own ANSI mapping (_ANSI_ROLES, resolved through this target’s own irix/data/anchors/terminals.yaml entry, since Target.anchor keys anchors by target name). Slots 16-255 are not anchor-curated: they are the entire Irix palette – Color.IRIX_MAP’s 20 hues x Color.SHADE_NAMES’s 12 shades = exactly 240 entries, exactly the non-ANSI slot count – dumped in chamber- major, hue-minor, shade-minor order. That mapping is a total systematic enumeration rather than a per-role editorial choice, so it is computed directly from Color instead of restating 240 addresses by hand in the anchor table.

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

Render the 256-slot indexed-color dump for mode.

Parameters:

mode – The scheme to render.

Returns:

A single-entry mapping of mode’s filename to its full file content.

model_config = {}#

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