package matrix

Build not yet checked
  1. Overview
  2. Docs
Fast, modern terminal toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.3.0.tbz
sha256=a92cbbcbe016fb19fb0a749222da0e459a9567aef3f4c7340d9bd6b71c53ed6f
sha512=6a7ab054605538bb31a2b73a1a6d093981a2704c9f0af5852221c05735290d74aca7c7282298c4d0f91e86a800e2ccd94b4918af883cd963449c758eb6b272b3

doc/matrix.test/Matrix_test/Profile/index.html

Module Matrix_test.ProfileSource

Terminal profiles, the facts of a terminal that a session plays.

Sourcetype t = {
  1. tty : bool;
    (*

    false for an output that is not a terminal, such as a pipe. The run then sets no mode and asks nothing, and the size is reported in band, as a mode 2048 report in the run's input (Matrix.run).

    *)
  2. answers : bool;
    (*

    false for a terminal that answers no query, such as one behind a link that drops its replies. A run waits for its answers until its wait ends, and the session's clock moves there.

    *)
  3. env : (string * string) list;
    (*

    The environment of the program's session, such as TERM and COLORTERM, from which the program guesses what the terminal does until it answers.

    *)
  4. identity : Vte.identity;
    (*

    Its answers to DA1, DA2 and XTVERSION.

    *)
  5. extensions : Vte.extension list;
    (*

    The protocols it implements beyond the VT core.

    *)
  6. width_method : Matrix.Text.width_method;
    (*

    How it measures text.

    *)
  7. palette : Matrix.Ansi.Palette.t;
    (*

    The palette its user configured.

    *)
  8. color_scheme : [ `Dark | `Light ];
    (*

    The scheme its user chose.

    *)
  9. cell_size : (int * int) option;
    (*

    The size of its cells in pixels, (width, height), which it reports to CSI 16 t and CSI 14 t (Creating).

    *)
}

The type for profiles. A named terminal enters as a value whose facts cite that terminal's documentation.

Sourceval vte : t

vte is matrix's emulator as it is: a terminal that answers, with its own identity (Vte.vt100), every extension, Unicode widths, the palette Matrix.Ansi.Palette.default, a dark scheme, no cell size, TERM=xterm-256color and COLORTERM=truecolor.

Sourceval pipe : t

pipe is vte as an output that is not a terminal, which answers no query and measures text with wcwidth, as a program that cannot ask the terminal does.