~bduggan/raku-terminal-ansi
#Terminal::ANSI

ANSI Escape Sequences

This module exports functions for emitting ANSI escape sequences.

It also maintains some state about the screen, such as a currently active scroll region.

It can optionally maintain the state of all of the characters on the screen, by writing to a virtual screen.

#Exported Functions

alt-font($n where { ... }) Alternate font n (between 11 and 19)

atomically(&callable) Combine a series of outputs into one.

blink() Blink

bold() Bold (increased intensity)

clear-screen() Clear the screen.

cursor-down($amt = 1) Move cursor down.

cursor-left($amt = 1) Move cursor left.

cursor-next-line($n = 1) Move cursor to the beginning of the next line, n lines down.

cursor-off() Turn off cursor (civis).

cursor-on() Turn on cursor (cnorm).

cursor-prev-line($n = 1) Move cursor to the beginning of the previous line, n lines up.

cursor-right($amt = 1) Move cursor right.

cursor-up($amt = 1) Move cursor up.

disable-output() Suppress all output

enable-output() Enable output

enable-virtual() Send commands to a virtual screen

erase-to-end-of-line() Erase to end of line.

faint() Faint (lower intensity)

hide-cursor() Hide the cursor.

home() Move to home (0,0).

italic() italic

move-to($l, $c = 1) Move the cursor to line, column.

normal-video() Normal video: same as text-reaset

parse-input($str) Return a description of the given input sequence

print-at($r, $c, $str) Atomic move + print.

reset-scroll-region() Reset the scroll region.

restore-cursor() restore the cursor position.

restore-screen() Restore screen (rmcup).

reverse-video() Reverse video

save-cursor() Save the cursor position.

save-screen() Save screen state (smcup).

scroll-down($n = 1) Scroll down by an amount.

scroll-up($n = 1) Scroll up by an amount.

set-bg-color($n) Set bg color to $n.

set-bg-default() Set bg color to default

set-bg-rgb-color($r, $g, $b) set bg color to $n.

set-fg-color($n) set fg color to $n.

set-fg-rgb-color($r, $g, $b) set fg color to $n.

set-scroll-region($top, $bottom) Set scroll region to top, bottom.

show-cursor() Show the cursor.

start-of-line() Move to start of line.

strike() Crossed out (striked)

terminal-ansi-throttle($rate = 0.1) Slow down the output for debugging

text-reset() Text reset (same as normal-video)

tget(&callable) Get strings instead of printing them.

underline() Underline

virtual-screen() Get the virtual screen receiving commands

About this wiki

commit 29d0bca8a7c7861fc6413a1cc009a9c6717ea90a
Author: Brian Duggan <bduggan@matatu.org>
Date:   2021-07-02T09:37:45-04:00

0.0.24
Clone this wiki
https://git.sr.ht/~bduggan/raku-terminal-ansi (read-only)
git@git.sr.ht:~bduggan/raku-terminal-ansi (read/write)