Mail Archives: cygwin/2004/04/28/19:11:09
------_=_NextPart_000_01C42D75.AB6C5F2A
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Here's the script that I use to see how things look and remind me of the
codes. Don't forget to put in the escapes where appropriate. Or use the
script in the attached file.
=3D=3D=3D=3D=3D=3Dcut=3D=3D=3D=3D=3D=3D
#!/bin/sh
gawk ' BEGIN {
print "=1B[7m 0 black 1 red 2 green 3 yellow 4 blue 5
magenta 6 cyan 7 white =1B[0m"
for (F =3D 30; F < 38; F++) {
for (I =3D 0; I < 2; I++) {
for (B =3D 40; B < 48; B++) {
printf "=1B[%i;%i;%im%i;%i;%i=1B[5m;5=1B[0;37;40m
", I, F, B, I, F, B
}
printf "\n"
}
}
exit 0
}' | \
sed -e 's/ $//'
echo '=1B[7m 7 =3D reverse video =3D 30;47 =1B[0m
=1B[5;8;44m 8 =3D conceal =3D 30 =1B[0m'
echo 'ln;colH =3D set cursor position, #A =3D up, #B =3D down, #C =3D ri=
ght, #D
=3D left,
s =3D save cursor position, u =3D restore cursor position
2J =3D clear screen, K =3D clear to end of line, 7l =3D no line wrapping'
=3D=3D=3D=3D=3D=3Dcut=3D=3D=3D=3D=3D=3D
Enjoy!
-----Original Message-----
From: Alejandro L=F3pez-Valencia=20
Sent: Wednesday, April 28, 2004 5:55 PM
To: cygwin AT cygwin DOT com
Subject: Re: How to set the colors of terminfo's standout mode?
At 07:56 a.m. 28/04/2004, Frank Slootweg wrote:
> Is there a place where all these (I assume ANSI) escape sequences for
>colors are listed? When I have that information, I can probably untic an
>existing terminfo entry, modify it and tic it back to another name and
>use that.
The one I use came with the documentation of an ftp/sftp client I use,=20
yafc. Tis information is very hard to come by if one is in a bind, so I'll=
=20
include it here. Yafc's info file says:
---begin quote
Colors
=3D=3D=3D=3D=3D=3D
Escape codes can be used to display colors in the transfer strings
and the prompts. All escape codes must be surrounded by %{ and %} pairs
for readline to correctly wrap long lines.
The built-in command `ls' has an option `--color'. You must set the
environment variable LS_COLORS (or LS_COLOURS) for this to work. See
manpage for GNU ls(1) and *note dircolors: (fileutils)dircolors
invocation, for information how to do this. If you don't set
LS_COLO[U]RS, you can still use the `--color' option, since Yafc
provides some default settings.
ANSI attribute codes
--------------------
An ANSI escape sequence has the format `ESC[X;Ym', where `ESC' is
the escape character (octal 033). `X' and, optionally, `Y', is one of
the following escape codes:
* attribute codes
- 00 =3D none
- 01 =3D bold
- 04 =3D underscore
- 05 =3D blink
- 07 =3D reverse
- 08 =3D concealed
* text color codes
- 30 =3D black
- 31 =3D red
- 32 =3D green
- 33 =3D yellow
- 34 =3D blue
- 35 =3D magenta
- 36 =3D cyan
- 37 =3D white
* background color codes
- 40 =3D black
- 41 =3D red
- 42 =3D green
- 43 =3D yellow
- 44 =3D blue
- 45 =3D magenta
- 46 =3D cyan
- 47 =3D white
For example, the sequence `ESC[1;32myafc rulesESC[0m' will be the
string `yafc rules' in bright green, after which the attribute is
restored to normal.
---end quote
--=20
Alejandro L=F3pez-Valencia
http://dradul.tripod.com/
The limits of my language are the limits of my world.
(L. Wittgenstein)=20
------_=_NextPart_000_01C42D75.AB6C5F2A
Content-Type: application/octet-stream;
name="ansi.bz2"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="ansi.bz2"
QlpoOTFBWSZTWeK0G7AAAJZ/gHAwAAl+7//Of/uOjT//3/5AAj22ks0IaEEK
G9UekGh6h6geo8oDajyg000aZPUG1P1QBoJNpGQjFG1NNAnpoCMRgjBM1Gmm
RobUOAYRhNMQwCAZADCNMmTCMBDQaaEo0jymnqGJ4kaA0BkABoD0h6gA0ro4
CJBEEihShBQk4V/chMi32ZpuixVUzY7oxz3M2DCSjJJctpX0ug4DN4QUgPHP
T5fxqgNiaAzuLx/cqFeBOyx0jzdBaUcludcrrhQkREQKM8WGZLVOX54+9WKB
8vk/JjveAM+9U4cEEWn9DkE42KdqXSExzK5xs7GldaspuWsqKKe/DC1sUzDL
0WAkMSk54mQDVamttNVkXUVF/bkuz5XEKyBkXXvBmZAv4fU1eEyLBYCp6unY
jqNNlA0NDY736rQKYSmBL54o6zXiu+yzKWIpD0ECgoUMFWALGFZXBdoYeYk4
O0Bb7rp4LOWAgs69TAqqUqPZhomBTuR+NnKe+K6obpq9X4GMzfJAIJqaHXuG
jwny0BYecMFNwcpkw5UKxQ3DDDvQCYn7qLhwaWjB5f6ChJFEW2CWjc5BPCt6
KGxfKljbFnhu97QsDRLJNCk6wo8BfNh9X89mnNrCFzTgRzi8psN34g0I87qS
xCKi2OuukiGF0iaiVIB5Y50a1zyUWYRA3EIOpDM0IHzigfNJz6IlkOVEkM29
XYHI6SKpMybbkGkSYi2DYWh5HrliKaWMssFjjlmZ5V2/3bbBaSGTwlVzldPl
tNCkSszUkfuikTLWuiXtVs2OF/B9SrJ5RrBh4qkFRy2LjvZRhrqcLJiUCc51
uWqfUVxe2jLr1WUQMGSolrhRQ4RlLZFF3cf/F3JFOFCQ4rQbsA==
------_=_NextPart_000_01C42D75.AB6C5F2A
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
------_=_NextPart_000_01C42D75.AB6C5F2A--
- Raw text -