ansi library
Ansi styling
Classes
- Ansi ansi
- A string with escape codes already in it, waiting to be printed.
- AnsiColour ansi
- A colour from the terminal's 256-colour palette.
- AnsiColourRgb ansi
- An exact 24-bit ("true colour") colour.
- AnsiInk ansi
- A colour that can be turned into terminal escape codes.
- AnsiPalette ansi
- The shared colours for the package's look.
- AnsiPrinter ansi styling
- Builds one line from codes and values, and prints it with a final RESET.
- AnsiTheme ansi
- The colours and symbols shared by prompts, menus, tables and file helpers.
- PromptGlyphs ansi
- The symbols prompts and widgets draw with, beyond the theme's basics.
Functions
-
copyToClipboard(
String text) → String -
Copies
textto the user's clipboard. -
cursorDown(
[int lines = 1]) → String -
Moves the cursor down by
linesrows. -
cursorLeft(
[int columns = 1]) → String -
Moves the cursor left by
columns. -
cursorRight(
[int columns = 1]) → String -
Moves the cursor right by
columns. -
cursorTo(
int row, int column) → String -
Moves the cursor to
rowandcolumnon the screen. -
cursorToColumn(
int column) → String -
Moves the cursor to
columnon the current line. -
cursorToLineAbove(
[int lines = 1]) → String -
Moves the cursor to the start of a line
linesrows above. -
cursorToLineBelow(
[int lines = 1]) → String -
Moves the cursor to the start of a line
linesrows below. -
cursorUp(
[int lines = 1]) → String -
Moves the cursor up by
linesrows. -
hyperlink(
String url, String text) → String -
Makes
texta clickable link that opensurl. -
notify(
String message) → String -
Pops up a desktop notification with
message. -
scrollDown(
[int lines = 1]) → String -
Scrolls the screen content down by
lines, adding blank lines at the top. -
scrollRegion(
int top, int bottom) → String -
Limits scrolling to the rows from
toptobottom. -
scrollUp(
[int lines = 1]) → String -
Scrolls the screen content up by
lines, adding blank lines at the bottom. -
taskbarError(
int percent) → String - Like taskbarProgress, but shown in red to say something failed.
-
taskbarPaused(
int percent) → String - Like taskbarProgress, but shown in yellow to say it is paused.
-
taskbarProgress(
int percent) → String -
Shows
percent(0 to 100) as progress on the terminal tab and taskbar. -
windowTitle(
String title) → String - Sets the title of the terminal window or tab.
Typedefs
- AnsiColorRgb = AnsiColourRgb
- American spelling of AnsiColourRgb.
- Color256 = AnsiColour
- American-style alias for AnsiColour, the 256-colour palette.
- ColorRgb = AnsiColourRgb
- Short alias for AnsiColourRgb, the 24-bit true colour.