--- rxvt-2.7.3-pristine/README.palette Sat Sep 9 18:52:45 2000 +++ rxvt-2.7.3/README.palette Sat Sep 9 19:02:12 2000 @@ -0,0 +1,54 @@ +Color extensions of XTerm escape sequences: ESC ] Ps;Pt BEL +(Escape Sequences are explained at http://www.rxvt.org/refer/rxvtRef.html) + +Note: Ps values are no longer experimental -- we simply emulate Xterm +(see ctlseqs.ms contained in ftp://dickey.his.com/xterm/xterm.tar.gz: + Operating System Controls + OSC Ps ; Pt BEL + Ps = 4 ; c ; name -> Change Color #c to cname. Any + number of c name pairs may be given. ) + +There are some examples. See rxvt-pal.tar.gz + +Author Christian W. Zuckschwerdt 2000-04-27 - 2000-09-08 + +In addition to the Ps values 39 and 49 there are some other +values to change the actual rxvt color scheme. + +ESC ] Ps;Pt BEL + + Ps = 3 9 Change default foreground colour to Pt + Ps = 4 9 Change default background colour to Pt + + Ps = 4 ; c ; name Change Color #c to cname. Any + number of c name pairs may be given. + Ps = 1 2 Change color name of text cursor foreground to Pt + Ps = 1 3 Change color name of mouse foreground to Pt + Ps = 1 7 Change color name of highlight to Pt + Ps = 1 8 Change color name of bold characters to Pt + Ps = 1 9 Change color name of underlined characters to Pt + +please note that Ps=10 and Ps=11 should change the foreground and back- +ground color. But RXVT already assigned another function (menu) to Ps=10! + +That is eg. + +ESC ] 4 ; 0 ; name Change former 'black' color +ESC ] 4 ; 1 ; name Change former 'red' color +ESC ] 4 ; 2 ; name Change former 'green' color +ESC ] 4 ; 3 ; name Change former 'yellow' color +ESC ] 4 ; 4 ; name Change former 'blue' color +ESC ] 4 ; 5 ; name Change former 'magenta' color +ESC ] 4 ; 6 ; name Change former 'cyan' color +ESC ] 4 ; 7 ; name Change former 'white' color +ESC ] 4 ; 8 ; name Change former 'bright black' color +ESC ] 4 ; 9 ; name Change former 'bright red' color +ESC ] 4 ; 10 ; name Change former 'bright green' color +ESC ] 4 ; 11 ; name Change former 'bright yellow' color +ESC ] 4 ; 12 ; name Change former 'bright blue' color +ESC ] 4 ; 13 ; name Change former 'bright magenta' color +ESC ] 4 ; 14 ; name Change former 'bright cyan' color +ESC ] 4 ; 15 ; name Change former 'bright white' color + +More documentation on request, if anyone actually cares. + --- rxvt-2.7.3-pristine/src/command.c Fri Jan 14 06:05:03 2000 +++ rxvt-2.7.3/src/command.c Sat Sep 9 19:06:06 2000 @@ -1987,6 +1987,9 @@ { int changed = 0; int fd; + char *buf; /* belongs to color code -- move away sometime */ + char *name; /* belongs to color code -- move away sometime */ + int color; /* belongs to color code -- move away sometime */ assert(str != NULL); switch (op) { @@ -2027,6 +2030,45 @@ case XTerm_restoreBG: set_window_color(Color_bg, str); break; + case XTerm_Color: + /* this color code should be moved away sometime */ + buf = str; + while (buf && *buf) { + name = strchr(buf, ';'); + if (name == NULL) + break; + *name = '\0'; + name++; + color = atoi(buf); + if (color < 0 || color >= TOTAL_COLORS) + break; + buf = strchr(name, ';'); + if (buf) { + *buf = '\0'; + buf++; + } + set_window_color(color+minCOLOR, name); + } + break; +#ifndef NO_CURSORCOLOR + case XTerm_Color_cursor: + set_window_color(Color_cursor, str); + break; + case XTerm_Color_highlight: + set_window_color(Color_cursor2, str); + break; +#endif + case XTerm_Color_pointer: + set_window_color(Color_pointer, str); + break; +#ifndef NO_BOLDUNDERLINE + case XTerm_Color_BD: + set_window_color(Color_BD, str); + break; + case XTerm_Color_UL: + set_window_color(Color_UL, str); + break; +#endif case XTerm_logfile: break; case XTerm_font: --- rxvt-2.7.3-pristine/src/main.c Sun Feb 27 05:57:52 2000 +++ rxvt-2.7.3/src/main.c Sat Sep 9 19:01:25 2000 @@ -785,7 +785,10 @@ XRecolorCursor(Xdisplay, TermWin_cursor, &fg, &bg); } /* the only reasonable way to enforce a clean update */ - scr_poweron(); +/* scr_poweron(); */ +/* scr_touch means our window is fully exposed */ +/* A redraw will occur, right? */ + scr_touch(0); } #else # define set_window_color(idx,color) ((void)0) --- rxvt-2.7.3-pristine/src/rxvt.h Sun Feb 27 05:57:52 2000 +++ rxvt-2.7.3/src/rxvt.h Sat Sep 9 19:03:00 2000 @@ -475,6 +475,18 @@ #define restoreFG 39 /* restore default fg color */ #define restoreBG 49 /* restore default bg color */ +/* + * color extensions of XTerm escape sequences: ESC ] Ps;Pt BEL + * Ps values are no longer experimental -- we emulate Xterm + * Christian W. Zuckschwerdt 2000-04-27 - 2000-09-08 + */ +#define XTerm_Color 4 /* change colors */ +#define XTerm_Color_cursor 12 /* change actual 'Cursor' color */ +#define XTerm_Color_pointer 13 /* change actual 'Pointer' color */ +#define XTerm_Color_highlight 17 /* change actual 'Highlight' color */ +#define XTerm_Color_BD 18 /* change actual 'Bold' color */ +#define XTerm_Color_UL 19 /* change actual 'Underline' color */ + /* Words starting with `Color_' are colours. Others are counts */ enum colour_list {