--enable-transparency
add support for inheriting parent backgrounds thus giving a fake
transparency to the term
+--enable-fading
+ add support for fading the text when focus is lost.
--enable-tinting
add support for tinting of transparent backgrounds.
--enable-menubar
/* Define if you want 8 bit control sequences */
#undef EIGHT_BIT_CONTROLS
+/* Define if you want faded colors when focus is lost */
+#undef OFF_FOCUS_FADING
+
/* Define if you want your background to be tinted */
#undef TINTING
support_linespace=no
support_inheritpixmap=no
support_tinting=no
+support_fading=no
support_keepscrolling=no
support_selectionscrolling=no
support_menubar=no
support_linespace=yes
support_inheritpixmap=yes
support_tinting=yes
+ support_fading=yes
support_keepscrolling=yes
support_selectionscrolling=yes
support_lastlog=yes
support_tinting=$enableval
fi])
+AC_ARG_ENABLE(fading,
+ [ --enable-tinting enable colors fading when off focus],
+ [if test x$enableval = xyes -o x$enableval = xno; then
+ support_fading=$enableval
+ fi])
+
AC_ARG_ENABLE(menubar,
[ --enable-menubar enable menubar],
[if test x$enableval = xyes -o x$enableval = xno; then
if test x$support_8bitctrls = xyes; then
AC_DEFINE(EIGHT_BIT_CONTROLS, 1, Define if you want 8 bit control sequences)
fi
+if test x$support_fading = xyes; then
+ AC_DEFINE(OFF_FOCUS_FADING, 1, Define if you want faded colors when focus is lost)
+fi
if test x$support_tinting = xyes; then
AC_DEFINE(TINTING, 1, Define if you want your background to be tinted)
fi
Turn on/off inheriting parent window\&'s pixmap\&. Alternative form
is \fB-tr\fP;
resource \fBinheritPixmap\fP\&.
+.IP "\fB-fade\fP \fInumber\fP"
+Fade the text by the given percentage when focus is lost\&.
.IP "\fB-tint\fP \fIcolour\fP"
Tint the transparent background pixmap with the given colour\&.
.IP "\fB-bg\fP \fIcolour\fP"
Turn on/off inheriting parent window\&'s pixmap\&. Alternative form
is \fB-tr\fP;
resource \fBinheritPixmap\fP\&.
+.IP "\fB-fade\fP \fInumber\fP"
+Fade the text by the given percentage when focus is lost\&.
.IP "\fB-tint\fP \fIcolour\fP"
Tint the transparent background pixmap with the given colour\&.
.IP "\fB-bg\fP \fIcolour\fP"
-COMMENT(-- $Id: rxvt-options.yo,v 1.12 2004-07-26 14:57:12 root Exp $ --)
+COMMENT(-- $Id: rxvt-options.yo,v 1.13 2004-07-30 14:59:12 root Exp $ --)
COMMENT(----------------------------------------------------------------------)
manpageoptions()
Turn on/off inheriting parent window's pixmap. Alternative form
is bf(-tr);
resource bf(inheritPixmap).
+ dit(bf(-fade) em(number))
+ 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.
dit(bf(-bg) em(colour))
./configure --prefix=/opt/rxvt --enable-utmp \
--enable-wtmp --enable-lastlog --enable-xim --disable-strings \
--with-term=rxvt --disable-keepscrolling --enable-xft --enable-mousewheel \
- --with-name=rxvt --enable-selectionscrolling \
- --enable-frills --enable-swapscreen --enable-transparency \
+ --with-name=rxvt --enable-selectionscrolling --enable-pointer-blank \
+ --enable-frills --enable-swapscreen --enable-transparency --enable-slipwheeling \
--with-codesets=eu,jp --enable-menubar --enable-tinting \
- --enable-cursor-blink --enable-pointer-blank --enable-text-blink \
+ --enable-cursor-blink --enable-text-blink --enable-fading \
--enable-plain-scroll --enable-rxvt-scroll --enable-combining \
"$@"
// TODO: free pixcolours, colours should become part of rxvt_display
- delete PixColors;
+ delete PixColorsFocused;
+#ifdef OFF_FOCUS_FADING
+ delete PixColorsUnFocused;
+#endif
displays.put (display);
{ /* bright colors */
i -= 8;
# ifndef NO_BRIGHTCOLOR
- PixColors[idx] = PixColors[minBrightCOLOR + i];
+ PixColorsFocused[idx] = PixColorsFocused[minBrightCOLOR + i];
SET_PIXCOLOR (idx);
goto Done;
# endif
}
if (i >= 0 && i <= 7)
{ /* normal colors */
- PixColors[idx] = PixColors[minCOLOR + i];
+ PixColorsFocused[idx] = PixColorsFocused[minCOLOR + i];
SET_PIXCOLOR (idx);
goto Done;
}
}
# endif
- PixColors[idx] = xcol;
+ PixColorsFocused[idx] = xcol;
SET_PIXCOLOR (idx);
/* XSetWindowAttributes attr; */
/* Cursor cursor; */
Done:
+#ifdef OFF_FOCUS_FADING
+ PixColorsUnFocused[idx] = PixColorsFocused[idx].fade (display, atoi (rs[Rs_fade]));
+#endif
if (idx == Color_bg && ! (Options & Opt_transparent))
- XSetWindowBackground (display->display, TermWin.vt,
- PixColors[Color_bg]);
+ XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]);
/* handle Color_BD, scrollbar background, etc. */
{
XColor xcol[2];
- xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColors[Color_pointer_fg] : PixColors[Color_fg];
- xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColors[Color_pointer_bg] : PixColors[Color_bg];
+ xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg];
+ xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg];
XQueryColors (display->display, XCMAP, xcol, 2);
XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1);
}
#endif
}
+rxvt_color
+rxvt_color::fade (rxvt_display *display, int percent)
+{
+ unsigned short cr, cg, cb;
+ rxvt_color faded;
+
+ get (display, cr, cg, cb);
+ faded.set (display,
+ cr * percent / 100,
+ cg * percent / 100,
+ cb * percent / 100);
+
+ return faded;
+}
+
bool set (rxvt_display *display, const char *name);
bool set (rxvt_display *display, unsigned short cr, unsigned short cg, unsigned short cb);
+ rxvt_color fade (rxvt_display *, int percent);
+
void free (rxvt_display *display);
};
XSizeHints szHint;
rxvt_display *display;
rxvt_color *PixColors;
+ rxvt_color *PixColorsFocused;
+#ifdef OFF_FOCUS_FADING
+ rxvt_color *PixColorsUnFocused;
+#endif
short numPixColors;
Cursor TermWin_cursor; /* cursor for vt window */
int sb_shadow; /* scrollbar shadow width */