--- rxvt-unicode/src/feature.h 2003/11/24 17:31:27 1.2 +++ rxvt-unicode/src/feature.h 2007/01/09 16:21:15 1.51 @@ -1,6 +1,5 @@ /* * File: feature.h - * $Id: feature.h,v 1.2 2003/11/24 17:31:27 pcg Exp $ * * Compile-time configuration. *----------------------------------------------------------------------- @@ -21,8 +20,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * *----------------------------------------------------------------------*/ -#ifndef _FEATURE_H -#define _FEATURE_H +#ifndef FEATURE_H +#define FEATURE_H #ifndef X11USRLIBDIR # define X11USRLIBDIR "/usr/X11R6/lib" @@ -32,87 +31,91 @@ #endif #ifndef XAPPLOADDIR # define XAPPLOADDIR X11LIBDIR "/app-defaults" -# define XAPPLOADDIRLOCALE X11LIBDIR "/%-.*s/app-defaults" +# define XAPPLOADDIRLOCALE X11LIBDIR "/%s/app-defaults" #endif -/*-----------------------SCREEN OPTIONS AND COLOURS---------------------*/ +/*-------------------------------SECURITY-------------------------------*/ + /* - * Define the name of the environment variable to be used in - * addition to the "PATH" environment and the `path' resource. - * Usually it should point to where you keep your background pixmaps and/or - * your menu files + * Default mode to restore when releasing the PTS device. It is relaxed to be + * compatible with most systems, change it to a more secure value if your + * system supports it (0640 for example). */ -#define PATH_ENV "RXVTPATH" +#define RESTORE_TTY_MODE 0666 /* - * Avoid enabling the colour cursor (-cr, cursorColor, cursorColor2) + * Define if you want to use a separate process for pty/tty handling + * when running setuid/setgid. You need this when making it setuid/setgid. */ -/* #define NO_CURSORCOLOR */ +#define PTYTTY_HELPER 1 + +/*-----------------------SCREEN OPTIONS AND COLOURS---------------------*/ /* - * Suppress use of BOLD and BLINK attributes for setting bright foreground - * and background, respectively. Simulate BOLD using colorBD, boldFont or - * overstrike characters. + * NOTE: + * + * Some of these configuration options have not been tested within the new + * rxvt-unicode framework. Changing them should work, might have no effect, + * destroy your disks or have any other effects. You may freely try (and + * report bugs, too!), but don't _expect_ them to work. */ -/* #define NO_BRIGHTCOLOR */ /* - * Make colours match xterm colours instead of `traditional' rxvt colours + * Forcefully disable double-buffering for xft. On some card/driver combination + * enabling it slightly decreases performance, on most it greatly helps it. + * The slowdown is small, so it should normally be enabled. */ -#define XTERM_COLORS +/* #define FORCE_UNBUFFERED_XFT */ /* - * Disable separate colours for bold, underline and reverse video + * The cursor blink interval, in seconds. */ -/* #define NO_BOLD_UNDERLINE_REVERSE */ +#define CURSOR_BLINK_INTERVAL 0.5 /* - * Disable using simulated bold using overstrike. You can also turn off - * overstrike just for multi char fonts - * Note: NO_BOLDOVERSTRIKE implies NO_BOLDOVERSTRIKE_MULTI + * The text blink interval, in seconds. */ -/* #define NO_BOLDOVERSTRIKE */ -/* #define NO_BOLDOVERSTRIKE_MULTI */ +#define TEXT_BLINK_INTERVAL CURSOR_BLINK_INTERVAL /* - * Don't bother cleaning up pixel droppings. If you don't use bold - * overstrike then you don't usually need this + * Avoid enabling the colour cursor (-cr, cursorColor, cursorColor2) */ -#define NO_PIXEL_DROPPING_AVOIDANCE +/* #define NO_CURSORCOLOR */ /* - * Also use bold font or overstrike even if we use colour for bold + * Make colours match xterm colours instead of `traditional' rxvt colours */ -/*#define VERYBOLD*/ +#define XTERM_COLORS /* - * Compile without support for real bold fonts + * Disable separate colours for bold, underline and reverse video */ -/* #define NO_BOLDFONT */ +/* #define NO_BOLD_UNDERLINE_REVERSE */ /* - * Add support for '-hc colour' for background highlight of selection + * Define maximum possible columns and rows */ -#define OPTION_HC +#define MAX_COLS 10000 +#define MAX_ROWS 10000 /* - * Define maximum possible columns and rows + * Define maximum possible savelines */ -#define MAX_COLS 4000 -#define MAX_ROWS 1000 +#define MAX_SAVELINES 10000000 /* * Define default colours for certain items. If you have a low colour * display, then consider using colours which are already pre-allocated: + * * Black (#000000) - * Red3 (#CD0000) + these - * Green3 (#00CD00) + colours - * Yellow3 (#CDCD00) + are - * Blue3 (#0000CD) + not - * Magenta3 (#CD00CD) + pre-allocated - * Cyan3 (#00CDCD) + if - * AntiqueWhite (#FAEBD7) + NO_BRIGHTCOLOR - * Grey25 (#404040) + defined + * Red3 (#CD0000) + * Green3 (#00CD00) + * Yellow3 (#CDCD00) + * Blue3 (#0000CD) + * Magenta3 (#CD00CD) + * Cyan3 (#00CDCD) + * AntiqueWhite (#FAEBD7) + * Grey25 (#404040) * Red (#FF0000) * Green (#00FF00) * Yellow (#FFFF00) @@ -122,10 +125,11 @@ * White (#FFFFFF) */ /* These colours MUST be defined */ -#define COLOR_FOREGROUND "Black" -#define COLOR_BACKGROUND "White" -#define COLOR_SCROLLBAR "#B2B2B2" /* scrollColor match Netscape */ -#define COLOR_SCROLLTROUGH "#969696" +#define COLOR_FOREGROUND "rgb:00/00/00" +#define COLOR_BACKGROUND "rgb:ff/ff/ff" +#define COLOR_SCROLLBAR "rgb:b2/b2/b2" /* scrollColor match Netscape */ +#define COLOR_SCROLLTROUGH "rgb:96/96/96" + /* * The cursor colours are special. Be very careful about setting these: * foreground/background colours may be modified by command line or resources @@ -136,10 +140,10 @@ #define COLOR_CURSOR_BACKGROUND NULL /* if NULL, use foreground colour */ /* - * Define to remove support for XCopyArea() support. XCopyArea() is useful + * Define to remove support for XCopyArea () support. XCopyArea () is useful * for scrolling on non-local X displays */ -/* #define NO_SLOW_LINK_SUPPORT */ +#define NO_SLOW_LINK_SUPPORT /* * Printer pipe which will be used for emulation of attached vt100 printer @@ -151,34 +155,14 @@ */ /* #define ALLOW_132_MODE */ -/*------------------------------RESOURCES-------------------------------*/ -/* - * Define to find installed application defaults for rxvt - * Only if USE_XGETDEFAULT is not defined. - */ -/* #define USE_XAPPLOADDIR */ - -/* - * Add support for the Offix DND (Drag 'n' Drop) protocol - */ -/* #define OFFIX_DND */ - /*---------------------------------KEYS---------------------------------*/ /* * Define defaults for backspace and delete keys - unless they have been * configured out with --disable-backspace-key / --disable-delete-key */ -/* #define DEFAULT_BACKSPACE "DEC" */ /* SPECIAL */ -#define DEFAULT_BACKSPACE "\010" -#define DEFAULT_DELETE "\033[3~" - -/* - * Choose one of these values to be the `hotkey' for changing font. - * This has been superceded and is only for you older users - */ -/* #define HOTKEY_CTRL */ -/* #define HOTKEY_META */ +#define DEFAULT_BACKSPACE "DEC" /* SPECIAL */ +#define DEFAULT_DELETE "\033[3~" /* * To use @@ -191,14 +175,14 @@ /* * Enable the keysym resource which allows you to define strings associated * with various KeySyms (0xFF00 - 0xFFFF). - * Only works with the default hand-rolled resources. + * Required by perl. */ -#ifndef NO_RESOURCES +#if ENABLE_FRILLS || ENABLE_PERL # define KEYSYM_RESOURCE #endif /* - * Modifier/s to use to allow up/down arrows and Priot/Next keys + * Modifier/s to use to allow up/down arrows and Prior/Next keys * to scroll single or page-fulls */ #define SCROLL_ON_SHIFT @@ -233,13 +217,6 @@ /* #define CTRL_TAB_MAKES_META */ /* #define MOD4_TAB_MAKES_META */ -/* - * default mode switch when greek keyboard is enabled (i.e. GREEK_SUPPORT) - */ -#ifndef GREEK_KEYBOARD_MODESWITCH -# define GREEK_KEYBOARD_MODESWITCH XK_Mode_switch -#endif - /*--------------------------------MOUSE---------------------------------*/ /* * Disable sending escape sequences (up, down, page up/down) @@ -251,7 +228,7 @@ * Default separating chars for multiple-click selection * Space and tab are separate separating characters and are not settable */ -#define CUTCHARS "\"&'()*,;<=>?@[\\]^`{|}~" +#define CUTCHARS "\"&'()*,;<=>?@[\\]^`{|}" /* * Add run-time support for changing the cutchars for double click selection @@ -261,7 +238,7 @@ /* * Have mouse reporting include double-click info for button1 */ -/* #define MOUSE_REPORT_DOUBLECLICK */ +//#define MOUSE_REPORT_DOUBLECLICK /* * Set delay between multiple click events [default: 500 milliseconds] @@ -275,53 +252,30 @@ #define MOUSE_THRESHOLD 50 /* - * If mouse wheel is defined, then scrolling is by 5 lines (or 1 line - * if the shift key is down). Scrolling can be smooth or jump scrolling - */ -/* #define JUMP_MOUSE_WHEEL */ - -/* * Set delay periods for continuous scrolling with scrollbar buttons */ -/* #define SCROLLBAR_INITIAL_DELAY 40 */ -/* #define SCROLLBAR_CONTINUOUS_DELAY 2 */ +/* #define SCROLLBAR_INITIAL_DELAY 0.33 */ +/* #define SCROLLBAR_CONTINUOUS_DELAY 0.05 */ /* * The speed of selection scrolling is proportional to the distance * the mouse pointer is out of the text window. This is the max * number of lines to scroll at a time. */ -#define SELECTION_SCROLL_MAX_LINES 2 +#define SELECTION_SCROLL_MAX_LINES 8 /* * The number of lines (measured in character's heights, not pixels) * the pointer must be out of the window for each increase in the * number of lines scrolled. */ -#define SELECTION_SCROLL_LINE_SPEEDUP 4 +#define SELECTION_SCROLL_LINE_SPEEDUP 3 /*--------------------------------MISC----------------------------------*/ /* - * Disable to reset tty device to pre-incovation state + * Only log in wtmp and lastlog files when we're a login shell (-ls option) */ -#define RESET_TTY_TO_COMMON_DEFAULTS - -/* - * Only log in wtmp file when we're a login shell (-ls option) - */ -#define WTMP_ONLY_ON_LOGIN - -/* - * When pasting ACS characters, convert to similar normal characters - */ -/* #define ACS_ASCII */ - -/* - * Default ascii characters to which ACS symbols are converted - */ -#ifdef ACS_ASCII -# define ACS_CHARS ".# o+ ----+---__++--|<> =#. " -#endif +#define LOG_ONLY_ON_LOGIN /*--------------------------------BELL----------------------------------*/ /* @@ -353,6 +307,11 @@ #define SB_WIDTH_MAXIMUM 100 /* + * rxvt scrollbar shadow width in pixels, must be 1 or 2 + */ +#define SHADOW_WIDTH 1 + +/* * When using Rxvt scrollbar, clicking above or below the slider will move * 1/4 of the screen height, if possible. Setting RXVT_SCROLL_FULL will move * it one screen height less one line, if possible @@ -364,26 +323,6 @@ */ /* #define SB_BORDER */ -/*------------------------------MENU BAR--------------------------------*/ -/* - * Choose how many of (experimental) menuBars you want to be able to stack at - * one time. - * A value of 1 disables menuBar stacking. - * A value of 0 disables menuBar all together. - * Note that the amount of memory overhead is the same for any value >= 2. - */ -#define MENUBAR_MAX 8 - -/* - * Change the default shadow style - */ -/* #define MENUBAR_SHADOW_IN */ - -/* - * Change the default shadow style - */ -#define MENU_SHADOW_IN - /*---------------------------MULTILINGUAL-------------------------------*/ /* * Allow run-time selection of Meta (Alt) to set the 8th bit on @@ -402,25 +341,13 @@ /* #define DISPLAY_IS_IP */ /* - * Have "\E[7n" transmit the display name. - * This has been cited as a potential security hole. - */ -#define ENABLE_DISPLAY_ANSWER - -/* * Change what ESC Z transmits instead of the default "\E[?1;2c" */ /* #define ESCZ_ANSWER "\033[?1;2C" */ /* - * Check the current value of the window-time/icon-name and avoid - * re-setting it to the same value -- avoids unnecessary window refreshes - */ -#define SMART_WINDOW_TITLE - -/* * Allow foreground/background colour to be changed with an - * xterm escape sequence "\E]39;colour^G" -- still experimental + * xterm escape sequence "\E]39;colour^G" */ #define XTERM_COLOR_CHANGE @@ -430,12 +357,6 @@ /* #define NO_SECONDARY_SCREEN_CURSOR */ /* - * If no secondary screen is available (NO_SECONDARY_SCREEN in config.h), - * then scroll the text up on a window change request - */ -#define SCROLL_ON_NO_SECONDARY - -/* * Width of the term internal border */ #define INTERNALBORDERWIDTH 2 @@ -453,23 +374,33 @@ /* * Default number of lines in the scrollback buffer */ -#define SAVELINES 64 +#define SAVELINES 1000 /* - * Provide termcap/terminfo bw support + * Provide termcap/terminfo bw support (wrap backwards on cub1) */ -/* #define TERMCAP_HAS_BW */ +#define TERMCAP_HAS_BW 1 /* - * MAX_NFONTS is the maximum allowed number of fonts in the list - * FONT0_IDX is the default font in the list (starting at 0) - * Sizes between multi-char fonts sets (MFONT_LIST) and single-char font - * sets (NFONT_LIST) have been matched up + * The duration of the visual bell flash in s. The default of 20ms + * corresponds to the delay given in the terminfo flash code. */ -#define MAX_NFONTS 7 -#define FONT0_IDX 2 +#define VISUAL_BELL_DURATION .020 -#define UNICODE 1 /* TODO */ -#define UTF8 1 /* TODO */ +/*--------------------------------OTHER---------------------------------*/ + +/* + * Enable the linux yield/usleep hack, which can dramatically improve + * performance by working around the linux kernel tty ratelimit bug. + * Unfortunately, it seems screen is negatively affected by this on some + * machines, so it is disabled by default. Use freebsd or any other kernel + * that doesn't suffer form this bug and it will be fast either way. + * + * See command.C for details. + */ +#if __linux__ +# define LINUX_YIELD_HACK 0 +#endif #endif +