kittyhud: Floating Chamber HUD#

Kitty-only floating chamber HUD using the direct graphics protocol: renders the ten Radix chambers as a small grid of colored icons, placed and cleared via Kitty’s graphics escape sequences, for glancing at the current colorcode chamber assignment without leaving the terminal.

Kitty-only floating chamber HUD using the direct graphics protocol.

irix.kittyhud.chamber_for(directory: str | Path, coder: PathCoder | None = None) → int | None#

Return the deepest valid Irix chamber in directory, if one exists.

irix.kittyhud.render_rgba(chamber: int, *, palette: Palette | None = None) → bytes#

Render the transparent five-chamber bar with exactly one highlighted chamber.

Parameters:
  • chamber – Zero-based index of the chamber to highlight.

  • palette – Palette to resolve chamber hues from. Defaults to Palette.dark() for backward compatibility; pass Palette.light() for a light-mode HUD (previously this was an unconditional local, unreachable from any flag).

irix.kittyhud.graphics_frames(pixels: bytes, *, width: int = 44, height: int = 8, chunk_size: int = 4096) → list[bytes]#

Encode raw RGBA pixels into direct Kitty graphics-protocol frames.

irix.kittyhud.clear_frame() → bytes#

Return the Kitty command that deletes only this HUD’s image placement and data.

irix.kittyhud.render_hud(directory: str | Path, *, writer: Callable[[bytes], object] | None = None, environment: Mapping[str, str] | None = None, columns: int | None = None, palette: Palette | None = None) → bool#

Render the HUD in Kitty, returning false without output anywhere else.

Parameters:
  • directory – Directory to derive the highlighted chamber from.

  • writer – Explicit byte sink (e.g. for tests). When omitted, writes go to /dev/tty with a sys.stdout.buffer fallback (term.write_tty_bytes).

  • environment – Environment mapping for Kitty detection. Defaults to os.environ.

  • columns – Terminal width override. Defaults to the real terminal size.

  • palette – Palette to render chamber hues from. Defaults to Palette.dark(); pass Palette.light() for a light-mode HUD.

irix.kittyhud.clear_hud(*, writer: Callable[[bytes], object] | None = None, environment: Mapping[str, str] | None = None) → bool#

Delete this HUD’s graphics in Kitty, returning false without output elsewhere.

irix.kittyhud.main(*vargs: str) → int#

Run the Kitty HUD command-line interface.