AC said:
> This version works on the 'xterm' default bright white
> background:

>       for f in 1 2 22 ; do seq -f "$f;%g" 30 36 ; done | rl -rc $L | for f in 
> $S ; do read c ; /bin/echo -ne "\033[49;$c\155$f " ; done ; echo -e 
> "\033[0\155"

> I don't know how to make the background bright white, (when
> it wasn't to begin with), and settled for '49'.

Partial progress:

        # color a fortune, on a bright white background.
        S=`fortune`   L=`echo $S | wc -w` ; for f in 1 2 22 ; do seq -f "$f;%g" 
30 36 ; done | rl -rc $L | for f in $S ; do read c ; /bin/echo -ne 
"\033[107;$c\155$f " ; done ; echo -e "\033[0\155"

The magic number is '107' in the middle.  It works correctly on
'xterm', 'xfce4-terminal', 'gnome-terminal', 'rxvt', and 'konsole'.
Plain text console output is black background.  Output in 'eterm' is
gray background instead of bright white.  'xvt' output is white
background with just gray or black foreground colors.  'shelltool' has
no color, probably by design, and might not be relevant.  "Reasons why
'ncurses' was invented."

Opening 'xterm' should always work in X:

        xterm -T "colors" -e 'S=`fortune`   L=`echo $S | wc -w` ; for f in 1 2 
22 ; do seq -f "$f;%g" 30 36 ; done | rl -rc $L | for f in $S ; do read c ; 
/bin/echo -ne "\033[107;$c\155$f " ; done ; echo -e "\033[0\155"; sleep 20s'

Suggestion:

        1) Use more portable black background example. 
                OR
        2) Have two examples, one for console, (black bg), and another for X 
(white bg).

HTH...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to