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):
AlacrittyTargetandWarpTargetare fidelity matches against pre-existing hand-authored artifacts.GhosttyTargetandTmuxTargetare new targets with no prior artifact, reusing kitty’s own ANSI mapping so the operator’s primary-terminal look carries over.Xterm256Targetreplaces 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:
TargetThe kitty terminal color config, rendered for both modes from one anchor table.
Reference implementation for the
irix.targetsprotocol: subsequent target families should follow this shape (module-level row tables,Target.anchorfor every resolved value, a generated-file header,deploy_destcomputed live from XDG env vars so tests can monkeypatchHOME/XDG_CONFIG_HOMEper-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_HOMEper-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:
TargetAlacritty’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 inirix.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 cosmeticdecorations_theme_varianthint 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:
TargetGhostty’s
key = valuetheme-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 sixteenirix/data/anchors/terminals.yamladdresses) so the operator’s primary-terminal look carries over.cursor_color/cursor_textand 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-themesdocs) is$XDG_CONFIG_HOME/ghostty/themes/<name>, extension-free – unlikerender’sout/filenames, so the mode is recovered from the relpath’s-lightsuffix 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:
TargetA sourceable tmux config snippet, rendered for both modes.
New target, generate-only (no
deploy_dest) – operatorssource-fileit from their own.tmux.confrather than have it installed under a fixed name. Slate neutrals carry the base status/window look; cyan is the shared “accent” hue (matchesWarpTarget’s accent and kitty’smark2, so active-pane/copy-mode highlights read as the same accent across every irix target); amber (kitty’s ANSI yellow) marksmessage-stylesince 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:
TargetWarp’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.yamlis identical to kitty’s own slate+cyan- accent mapping – sameirix/data/irix-dark.yamladdresses, warp-local role names – so no literal'#hex'anchors were needed.deploy_destrepairs the previous (removed)Deployer.warpaction, which pointed at a nonexistent.tomlfile; seeirix.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(notXDG_CONFIG_HOME– Warp is a data-dir application), and its file naming (irix-{mode}.yaml) differs fromrender’sout/filenames, so the mode is recovered from the relpath’s-lightmarker 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:
TargetA 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 ownirix/data/anchors/terminals.yamlentry, sinceTarget.anchorkeys anchors by target name). Slots 16-255 are not anchor-curated: they are the entire Irix palette –Color.IRIX_MAP’s 20 hues xColor.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 fromColorinstead 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].