View Source Termite.Screen (Termite v0.3.0)

This module handles terminal related escape sequences. See the source for valid escape sequences.

Summary

Functions

Switch to alt screen.

Clears the screen.

Move the cursor back by n cells.

Move the cursor down by n lines.

Move the cursor forward by n cells.

Move the cursor down by n lines and place cursor at the beginning of the line.

Set the cursor position to x,y.

Move the cursor up by n lines and place cursor at the beginning of the line.

Move the cursor up by n lines.

Delete the specified number of characters from the cursor.

Return the escape code for the terminal.

Return an escape sequence.

Exit to alt screen.

Hide the cursor.

Write an escape sequence to the terminal.

Show the cursor.

Functions

Switch to alt screen.

Clears the screen.

Link to this function

cursor_back(term, n \\ 1)

View Source

Move the cursor back by n cells.

Link to this function

cursor_down(term, n \\ 1)

View Source

Move the cursor down by n lines.

Link to this function

cursor_forward(term, n \\ 1)

View Source

Move the cursor forward by n cells.

Link to this function

cursor_next_line(term, n \\ 1)

View Source

Move the cursor down by n lines and place cursor at the beginning of the line.

Link to this function

cursor_position(term, x, y)

View Source

Set the cursor position to x,y.

Link to this function

cursor_previous_line(term, n \\ 1)

View Source

Move the cursor up by n lines and place cursor at the beginning of the line.

Move the cursor up by n lines.

Link to this function

delete_chars(term, n \\ 1)

View Source

Delete the specified number of characters from the cursor.

Return the escape code for the terminal.

iex> Termite.Screen.escape_code()
"["
Link to this function

escape_sequence(command, args \\ [])

View Source

Return an escape sequence.

iex> Termite.Screen.escape_sequence(:cursor_back, [3])
""

Exit to alt screen.

Hide the cursor.

Link to this function

run_escape_sequence(term, command, args \\ [])

View Source

Write an escape sequence to the terminal.

Show the cursor.

See Termite.Terminal.write/2.