Tuix.Terminal (tuix v0.1.0)

Copy Markdown View Source

Owns the terminal: switches it into raw mode and the alternate screen on start, and restores it on shutdown — including crash shutdowns.

Requires OTP 29+ (raw mode via :shell.start_interactive/1 and :io_ansi).

Static terminal control (alternate screen, cursor visibility, keypad transmit mode) goes through OTP 29's :io_ansi, which uses the local terminfo database and strips sequences the terminal does not support. Frame rendering writes precomposed iodata (see Tuix.Terminal.ANSI).

Summary

Functions

Returns a specification to start this module under a supervisor.

Returns the current terminal size as {columns, rows}.

Writes iodata to the terminal.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

size()

@spec size() :: {pos_integer(), pos_integer()}

Returns the current terminal size as {columns, rows}.

start_link(opts \\ [])

write(iodata)

Writes iodata to the terminal.