From dbe9d6f35e71786efd193daaab39f4e791317e74 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 31 May 2023 16:52:12 -0500 Subject: Add (yolk attrs) --- readme | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'readme') diff --git a/readme b/readme index 5eaa9f6..baa3bbc 100644 --- a/readme +++ b/readme @@ -49,9 +49,28 @@ macro defines a parameter named PARAM-NAME and a procedure named WRAPPER-PROC-NAME that will call PARAM-NAME with ARGS ... . The user can change which procedure to call by calling (PARAM-NAME new-proc). -(yolk colors) --- NOT FINISHED +(yolk attrs) --- text attributes -There's a bug in this library. +-- (prop? x) + +Returns X if X is a text property (non-color); otherwise returns #f. + +-- (color? x) + +Returns X if X is a terminal color name; otherwise returns #f. + +-- (attrs as) + +AS is a list of attributes, each of one of the following forms: + +- [number] -- returned directly +- [color], (fg [color]), (fg . [color]) -- set the foreground to [color] +- (bg [color]), (bg . [color]) -- set the background to [color] +- [property], (set [property]), (set . [property]) -- turn [property] on +- (reset [property]), (reset . [property]) -- turn [property] off +- 'reset -- reset the text attributes + +Anything else is an error. `attrs' returns a string ready to be displayed on the terminal. (yolk cursor) --- cursor movement @@ -133,6 +152,11 @@ Save or restore the screen's state. Enable or disable the "alternate buffer." +REFERENCES. + [1]: http://wiki.call-cc.org/eggref/5/ansi-escape-sequences [2]: https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797 [3]: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html + +- https://xn--rpa.cc/irl/term.html +- (man "console_codes") -- cgit 1.4.1-21-gabe81