From 42a46795d41e0c0c880f1cf0e528022c2ef545f1 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 30 Jul 2004 22:32:33 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 17 +++++++++++++--- doc/rxvt.1 | 4 ++++ doc/rxvt.tbl | 4 ++++ doc/yodl/rxvt-options.yo | 7 +++++-- doc/yodl/rxvt-resources.yo | 6 +++++- src/rxvt.h | 8 +++++++- src/xdefaults.C | 40 +++++++++++++++----------------------- 7 files changed, 55 insertions(+), 31 deletions(-) diff --git a/Changes b/Changes index 1f7b1fa3..30488161 100644 --- a/Changes +++ b/Changes @@ -2,11 +2,22 @@ Lines marked with "xterm:" indicate either xterm features ported to rxvt or changed rxvt behaviour to make it more compatible to xterm (usually xfree86's xterm). -TODO: escaping system for long escape sequences, so we can stop on CR/LF. TODO: implement xterm mode to be able to use xfree's TERM=xterm. TODO: multibyte support for setwmname et al. -TODO: there are other todo items, but they are not in this file because they - are very long-term :) +TODO: there are other todo items, but they are not in this file. + +3.3 + - some doc updates (Eduard Bloch). + - use faster inheritpixmap method when tinting color not set. + - fix pixmap offset when tinting (reported by Eduard Bloch). + - new -sh option by Mikael Magnusson. + - off-focus-fading (--enable-fading) support (patch by + Mikael Magnusson). + - cursor now set correctly on --disable-blank (reported by + Mikael Magnusson). + - better (and non-crashing) slipwheeling (Mikael Magnusson). + - solaris 2.8 portability changes (reported by Colin Marquardt). + - disable-xim now really disables xim code. 3.2 Mon Jul 26 19:57:32 CEST 2004 - support real bold fonts (patch by Adam Sampson ), diff --git a/doc/rxvt.1 b/doc/rxvt.1 index 71a5b991..148bf5bd 100644 --- a/doc/rxvt.1 +++ b/doc/rxvt.1 @@ -293,8 +293,12 @@ option \fB+j\fP\&. \fBTrue\fP: make the background inherit the parent windows\&' pixmap, giving artificial transparency\&. \fBFalse\fP: do not inherit the parent windows\&' pixmap\&. +.IP "\fBfading:\fP \fInumber\fP" +Fade the text by the given percentage when focus is lost\&. .IP "\fBtintColor:\fP \fIcolour\fP" Tint the transparent background pixmap with the given colour\&. +.IP "\fBfading:\fP \fInumber\fP" +Scale the tint colour by the given percentage\&. .IP "\fBscrollColor:\fP \fIcolour\fP" Use the specified colour for the scrollbar [default #B2B2B2]\&. .IP "\fBtroughColor:\fP \fIcolour\fP" diff --git a/doc/rxvt.tbl b/doc/rxvt.tbl index 0d75f2fa..234846fd 100644 --- a/doc/rxvt.tbl +++ b/doc/rxvt.tbl @@ -290,8 +290,12 @@ option \fB+j\fP\&. \fBTrue\fP: make the background inherit the parent windows\&' pixmap, giving artificial transparency\&. \fBFalse\fP: do not inherit the parent windows\&' pixmap\&. +.IP "\fBfading:\fP \fInumber\fP" +Fade the text by the given percentage when focus is lost\&. .IP "\fBtintColor:\fP \fIcolour\fP" Tint the transparent background pixmap with the given colour\&. +.IP "\fBfading:\fP \fInumber\fP" +Scale the tint colour by the given percentage\&. .IP "\fBscrollColor:\fP \fIcolour\fP" Use the specified colour for the scrollbar [default #B2B2B2]\&. .IP "\fBtroughColor:\fP \fIcolour\fP" diff --git a/doc/yodl/rxvt-options.yo b/doc/yodl/rxvt-options.yo index 10f41c7a..317c8ef2 100644 --- a/doc/yodl/rxvt-options.yo +++ b/doc/yodl/rxvt-options.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-options.yo,v 1.14 2004-07-30 19:51:49 root Exp $ --) +COMMENT(-- $Id: rxvt-options.yo,v 1.15 2004-07-30 22:32:33 root Exp $ --) COMMENT(----------------------------------------------------------------------) manpageoptions() @@ -43,7 +43,10 @@ startdit() Fade the text by the given percentage when focus is lost. dit(bf(-tint) em(colour)) Tint the transparent background pixmap with the given colour when - transparency is enabled with bf(-tr) or bf(-ip). + transparency is enabled with bf(-tr) or bf(-ip). You can also + emulate the "shading" or "brigthness change" option known from + other terminal programs using gray10 (gray20, etc.) colour + strings. dit(bf(-bg) em(colour)) Window background colour; resource bf(background). diff --git a/doc/yodl/rxvt-resources.yo b/doc/yodl/rxvt-resources.yo index f711d72f..a77abb7b 100644 --- a/doc/yodl/rxvt-resources.yo +++ b/doc/yodl/rxvt-resources.yo @@ -1,4 +1,4 @@ -COMMENT(-- $Id: rxvt-resources.yo,v 1.16 2004-07-30 22:32:33 root Exp $ --) +COMMENT(-- $Id: rxvt-resources.yo,v 1.17 2004-07-30 22:36:42 root Exp $ --) COMMENT(----------------------------------------------------------------------) manpagesection(RESOURCES (available also as long-options)) @@ -81,8 +81,12 @@ startdit() bf(True): make the background inherit the parent windows' pixmap, giving artificial transparency. bf(False): do not inherit the parent windows' pixmap. + dit(bf(fading:) em(number)) + Fade the text by the given percentage when focus is lost. dit(bf(tintColor:) em(colour)) Tint the transparent background pixmap with the given colour. + dit(bf(fading:) em(number)) + Scale the tint colour by the given percentage. dit(bf(scrollColor:) em(colour)) Use the specified colour for the scrollbar [default #B2B2B2]. dit(bf(troughColor:) em(colour)) diff --git a/src/rxvt.h b/src/rxvt.h index 3b74b19d..211b6026 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -555,6 +555,12 @@ enum { #endif #ifndef NO_BOLD_UNDERLINE_REVERSE Rs_realBold, +#endif +#ifdef OFF_FOCUS_FADING + Rs_fade, +#endif +#ifdef TINTING + Rs_shade, #endif NUM_RESOURCES }; @@ -1155,8 +1161,8 @@ struct rxvt_term : rxvt_vars { #ifdef POINTER_BLANK void pointer_cb (time_watcher &w); time_watcher pointer_ev; void pointer_blank (); - void pointer_unblank (); #endif + void pointer_unblank (); void tt_printf (const char *fmt,...); void tt_write (const unsigned char *data, unsigned int len); diff --git a/src/xdefaults.C b/src/xdefaults.C index d9794845..3daa2628 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -110,6 +110,12 @@ optList[] = { #if TINTING STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), #endif +#endif +#ifdef OFF_FOCUS_FADING + STRG (Rs_fade, "fading", "fade", "%", "make colors x% darker when urxvt is losing focus."), +#endif +#ifdef TINTING + STRG (Rs_shade, "shading", "sh", "%", "shade background by x% when tinting."), #endif BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"), #ifndef NO_BELL @@ -464,32 +470,18 @@ rxvt_term::get_options (int argc, const char *const *argv) { if (optList_isReverse (entry)) flag = flag == On ? Off : On; - if (optList_strlen (entry)) - { /* string value */ - const char *str = argv[++i]; -#ifdef DEBUG_RESOURCES - fprintf (stderr, "string (%s,%s) = ", - optList[entry].opt ? optList[entry].opt : "nil", - optList[entry].kw ? optList[entry].kw : "nil"); -#endif - if (flag == On && str && (optList[entry].doff != -1)) - { -#ifdef DEBUG_RESOURCES - fprintf (stderr, "\"%s\"\n", str); -#endif - rs[optList[entry].doff] = str; - /* - * special cases are handled in main.c:main () to allow - * X resources to set these values before we settle for - * default values - */ - } -#ifdef DEBUG_RESOURCES - else - fprintf (stderr, "???\n"); -#endif + if (optList_strlen (entry)) + { + /* + * special cases are handled in main.c:main () to allow + * X resources to set these values before we settle for + * default values + */ + if (optList[entry].doff != -1) + rs[optList[entry].doff] = flag == On && argv[i+1] + ? argv[++i] : 0; } else { /* boolean value */ -- 2.34.1