1 /* -*-c-*- */ 2 3 /* File: defaults.h 4 * 5 * Description: 6 * #defines for default values shall go into this file as well as tunable 7 * parameters. 8 */ 9 10 #ifndef _DEFAULTS_ 11 #define _DEFAULTS_ 12 13 /*** event handling ***/ 14 #define CLOCK_SKEW_MS 30000 /* ms */ 15 16 /*** grabbing the pointer ***/ 17 #define NUMBER_OF_GRAB_ATTEMPTS 100 18 #define TIME_BETWEEN_GRAB_ATTEMPTS 10 /* ms */ 19 20 /*** bindings and mouse buttons ***/ 21 /* Fvwm needs at least 3 buttons. X currently supports up to 5 buttons, so you 22 * can use 3, 4 or 5 here. Do not set this to values higher than 5! Use the 23 * next macro for that. */ 24 #define NUMBER_OF_MOUSE_BUTTONS 5 25 /* The "extended" buttons do not provide the full functionality because X has 26 * no bit mask value for them. Things like dragging windows don't work with 27 * them. */ 28 #define NUMBER_OF_EXTENDED_MOUSE_BUTTONS 9 29 #if NUMBER_OF_EXTENDED_MOUSE_BUTTONS > 31 30 #error No more than 31 mouse buttons can be supported on 32 bit platforms 31 #endif 32 #define DEFAULT_ALL_BUTTONS_MASK \ 33 ((Button1Mask * ((1 << NUMBER_OF_MOUSE_BUTTONS) - 1))) 34 #define DEFAULT_ALL_BUTTONS_MOTION_MASK \ 35 ((Button1MotionMask * ((1 << NUMBER_OF_MOUSE_BUTTONS) - 1))) 36 #define DEFAULT_MODS_UNUSED LockMask 37 38 39 /* 40 * These values may be adjusted to fine tune the menu looks. 41 */ 42 /* The first option of the default menu style must be fvwm/win/mwm/.... 43 * fvwm may crash if not. */ 44 #define DEFAULT_MENU_STYLE \ 45 "MenuStyle * fvwm, Foreground black, Background grey, " \ 46 "Greyed slategrey, MenuColorset, ActiveColorset, GreyedColorset" 47 #define DEFAULT_CLICKTIME 150 /* ms */ 48 #define DEFAULT_POPUP_DELAY 15 /* ms*10 */ 49 #define DEFAULT_POPDOWN_DELAY 15 /* ms*10 */ 50 #define DEFAULT_MENU_CLICKTIME (3*DEFAULT_CLICKTIME) 51 #define DEFAULT_MOVE_THRESHOLD 3 /* pixels */ 52 #define MAX_MENU_COPIES 10 /* menu copies */ 53 #define MAX_MENU_ITEM_LABELS 3 /* labels (max. 15) */ 54 #define MAX_MENU_ITEM_MINI_ICONS 2 /* mini icons (max. 15) */ 55 #define DEFAULT_MENU_BORDER_WIDTH 2 /* pixels */ 56 #define MAX_MENU_BORDER_WIDTH 50 /* pixels */ 57 #define MAX_MENU_ITEM_RELIEF_THICKNESS 50 /* pixels */ 58 #define PARENT_MENU_FORCE_VISIBLE_WIDTH 20 /* pixels */ 59 #define DEFAULT_MENU_POPUP_NOW_RATIO 75 /* % of item width */ 60 /* default item formats for left and right submenus. */ 61 #define DEFAULT_MENU_ITEM_FORMAT "%s%.1|%.5i%.5l%.5l%.5r%.5i%2.3>%1|" 62 #define DEFAULT_LEFT_MENU_ITEM_FORMAT "%.1|%3.2<%5i%5l%5l%5r%5i%1|%s" 63 /* size of the submenu triangle. */ 64 #define MENU_TRIANGLE_WIDTH 5 /* pixels */ 65 #define MENU_TRIANGLE_HEIGHT 9 /* pixels */ 66 /* menu underline parameters */ 67 #define MENU_UNDERLINE_THICKNESS 1 /* pixels */ 68 #define MENU_UNDERLINE_GAP 1 /* pixels */ 69 #define MENU_UNDERLINE_HEIGHT (MENU_UNDERLINE_THICKNESS + MENU_UNDERLINE_GAP) 70 /* menu separator parameters */ 71 #define MENU_SEPARATOR_SHORT_X_OFFSET 5 /* pixels */ 72 #define MENU_SEPARATOR_Y_OFFSET 2 /* pixels */ 73 #define MENU_SEPARATOR_HEIGHT 2 /* pixels */ 74 #define MENU_SEPARATOR_TOTAL_HEIGHT \ 75 (MENU_SEPARATOR_HEIGHT + MENU_SEPARATOR_Y_OFFSET) 76 /* menu tear off bar parameters */ 77 #define MENU_TEAR_OFF_BAR_X_OFFSET 1 /* pixels */ 78 #define MENU_TEAR_OFF_BAR_Y_OFFSET 1 /* pixels */ 79 #define MENU_TEAR_OFF_BAR_HEIGHT 4 /* pixels */ 80 #define MENU_TEAR_OFF_BAR_DASH_WIDTH 5 /* pixels */ 81 /* gap above item text */ 82 #define DEFAULT_MENU_ITEM_TEXT_Y_OFFSET 1 /* pixels */ 83 /* gap below item text */ 84 #define DEFAULT_MENU_ITEM_TEXT_Y_OFFSET2 2 /* pixels */ 85 /* same for titles */ 86 #define DEFAULT_MENU_TITLE_TEXT_Y_OFFSET (DEFAULT_MENU_ITEM_TEXT_Y_OFFSET) 87 #define DEFAULT_MENU_TITLE_TEXT_Y_OFFSET2 (DEFAULT_MENU_ITEM_TEXT_Y_OFFSET2) 88 /* minimum for above value */ 89 #define MIN_VERTICAL_SPACING -100 /* pixels */ 90 /* maximum for above value */ 91 #define MAX_VERTICAL_SPACING 100 /* pixels */ 92 /* maximum for above value */ 93 #define MAX_MENU_MARGIN 50 /* pixels */ 94 /* width of a tab in the item format of a menu */ 95 #define MENU_TAB_WIDTH 8 /* spaces */ 96 /* This is the tile width or height for V and H gradients. I guess this should 97 * better be a power of two. A value of 5 definitely causes XFree 3.3.3.1 to 98 * screw up the V_GRADIENT on an 8 bit display, but 4, 6, 7 etc. work well. */ 99 #define DEFAULT_MENU_GRADIENT_PIXMAP_THICKNESS 4 100 101 /*** colours ***/ 102 #define DEFAULT_FORE_COLOR "black" 103 #define DEFAULT_BACK_COLOR "gray" 104 #define DEFAULT_HILIGHT_COLOR "white" 105 #define DEFAULT_SHADOW_COLOR "black" 106 #define DEFAULT_CURSOR_FORE_COLOR "black" 107 #define DEFAULT_CURSOR_BACK_COLOR "white" 108 109 /*** pager ***/ 110 #define DEFAULT_MOVE_THRESHOLD 3 /* pixels */ 111 #define DEFAULT_PAGER_WINDOW_BORDER_WIDTH 1 /* pixels */ 112 113 /*** fonts ***/ 114 #define EXTRA_TITLE_FONT_HEIGHT 3 /* pixels */ 115 #define EXTRA_TITLE_FONT_WIDTH 3 /* pixels */ 116 #define MIN_FONT_HEIGHT (EXTRA_TITLE_FONT_HEIGHT + 2) 117 #define MAX_FONT_HEIGHT 256 /* pixels */ 118 119 /*** Flocale ***/ 120 /* adding the good number of "*" speed-up font loading with certain X 121 * server */ 122 #define FLOCALE_MB_FALLBACK_FONT \ 123 "-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*," \ 124 "-*-fixed-medium-r-normal-*-14-*-*-*-*-*-*-*," \ 125 "-*-*-medium-r-normal-*-16-*-*-*-*-*-*-*" 126 /* rationale: -*-fixed-medium-r-semicondensed-*-13-* should gives "fixed" in 127 most non multibyte charset (?). 128 -*-fixed-medium-r-normal-*-14-* is ok for jsx 129 -*-medium-r-normal-*-16-* is for gb 130 Of course this is for XFree. Any help for other X server basic font set 131 is welcome. 132 */ 133 #define FLOCALE_FALLBACK_FONT "fixed" 134 #define FLOCALE_FFT_FALLBACK_FONT "MonoSpace" 135 136 #define FLOCALE_NUMBER_MISS_CSET_ERR_MSG 5 137 138 /*** window geometry ***/ 139 #define DEFAULT_MIN_MAX_WINDOW_WIDTH 100 /* pixels */ 140 #define DEFAULT_MIN_MAX_WINDOW_HEIGHT 100 /* pixels */ 141 #define DEFAULT_MAX_MAX_WINDOW_WIDTH 32767 /* pixels */ 142 #define DEFAULT_MAX_MAX_WINDOW_HEIGHT 32767 /* pixels */ 143 144 /*** icon geometry ***/ 145 #define UNSPECIFIED_ICON_DIMENSION -1 146 #define MIN_ALLOWABLE_ICON_DIMENSION 0 /* pixels */ 147 #define MAX_ALLOWABLE_ICON_DIMENSION 255 /* pixels */ 148 149 /* this value is used in a bugfix */ 150 #define WINDOW_FREAKED_OUT_SIZE 65500 /* pixels */ 151 /* Used in Workaround for broken min and max size hints vs a size request */ 152 #define BROKEN_MAXSIZE_LIMIT 1 153 #define BROKEN_MINSIZE_LIMIT 30000 154 155 /* geometry window */ 156 #define GEOMETRY_WINDOW_BW 2 /* pixels */ 157 #define GEOMETRY_WINDOW_STRING " +8888 x +8888 " 158 #define GEOMETRY_WINDOW_POS_STRING " %+-4d %+-4d " 159 #define GEOMETRY_WINDOW_SIZE_STRING " %4d x %-4d " 160 161 /* 162 * window title layout 163 */ 164 /* the title buttons are shrunk if the title would become smaller than this 165 * number of pixels */ 166 #define MIN_WINDOW_TITLE_LENGTH 10 /* pixels */ 167 /* title bar buttons that get smaller than this size are hidden */ 168 #define MIN_WINDOW_TITLEBUTTON_LENGTH 2 /* pixels */ 169 /* height of stick lines */ 170 #define WINDOW_TITLE_STICK_HEIGHT 1 /* pixels */ 171 /* vertical distance between stick lines */ 172 #define WINDOW_TITLE_STICK_VERT_DIST 4 /* pixels */ 173 /* minimum width of stick lines */ 174 #define WINDOW_TITLE_STICK_MIN_WIDTH 1 /* pixels */ 175 /* gap between border of title window and stick lines */ 176 #define WINDOW_TITLE_STICK_OFFSET 4 /* pixels */ 177 /* gap between title and stick lines */ 178 #define WINDOW_TITLE_TO_STICK_GAP 4 /* pixels */ 179 /* gap between border of title window and text */ 180 #define WINDOW_TITLE_TEXT_OFFSET 10 /* pixels */ 181 /* minimal gap between border of title window and text */ 182 #define MIN_WINDOW_TITLE_TEXT_OFFSET 2 /* pixels */ 183 /* left and right padding for the text into under text area (MultiPixmap)*/ 184 #define TBMP_TITLE_PADDING 5 185 /* minimal left and right area vs left/right of text/end (MultiPixmap) */ 186 #define TBMP_MIN_RL_TITLE_LENGTH 7 187 /* maximum number of segemnts in a vector button */ 188 #define MAX_TITLE_BUTTON_VECTOR_LINES 10000 189 190 /*** window placement ***/ 191 /** MinOverlap(Percent)Placement **/ 192 /** Now these values are configurable by using styles **/ 193 /* The following factors represent the amount of area that these types of 194 * windows are counted as. For example, by default the area of ONTOP windows 195 * is counted 5 times as much as normal windows. So CleverPlacement will 196 * cover 5 times as much area of another window before it will cover an ONTOP 197 * window. To treat ONTOP windows the same as other windows, set this to 1. 198 * To really, really avoid putting windows under ONTOP windows, set this to a 199 * high value, say 1000. A value of 5 will try to avoid ONTOP windows if 200 * practical, but if it saves a reasonable amount of area elsewhere, it will 201 * place one there. The same rules apply for the other "AVOID" factors. */ 202 /* With the advent of layers, the meaning of ONTOP in the following 203 explanation has changed to mean any window in a higher layer. */ 204 #define PLACEMENT_AVOID_BELOW 0.05 205 #define PLACEMENT_AVOID_STICKY 1.0 206 #define PLACEMENT_AVOID_ONTOP 5 207 #define PLACEMENT_AVOID_ICON 10 208 #define PLACEMENT_AVOID_EWMH_STRUT 50 209 /* used in MinOverlap*Placement to forbid complete covering (99%, 95% 210 85% and 75%) of windows */ 211 #define PLACEMENT_AVOID_COVER_99 12 212 #define PLACEMENT_AVOID_COVER_95 6 213 #define PLACEMENT_AVOID_COVER_85 4 214 #define PLACEMENT_AVOID_COVER_75 1 215 #define PLACEMENT_FALLBACK_CASCADE_STEP 20 216 /** Other placement related values **/ 217 /* default string for position placement */ 218 #define DEFAULT_PLACEMENT_POSITION_STRING "0 0" 219 #define DEFAULT_PLACEMENT_POS_CENTER_STRING "50-50w 50-50w" 220 #define DEFAULT_PLACEMENT_POS_MOUSE_STRING "m-50w m-50w" 221 222 /*** icon layout ***/ 223 /* width of the relief around the icon and icon title */ 224 #define ICON_RELIEF_WIDTH 2 /* pixels */ 225 /* height of stick lines */ 226 #define ICON_TITLE_STICK_HEIGHT WINDOW_TITLE_STICK_HEIGHT 227 /* vertical distance between stick lines */ 228 #define ICON_TITLE_STICK_VERT_DIST WINDOW_TITLE_STICK_VERT_DIST 229 /* vertical offset for icon title */ 230 #define ICON_TITLE_VERT_TEXT_OFFSET -3 /* pixels */ 231 /* minimum width of stick lines */ 232 #define ICON_TITLE_STICK_MIN_WIDTH 3 /* pixels */ 233 /* number of blank pixels before and after a collapsed title */ 234 #define ICON_TITLE_TEXT_GAP_COLLAPSED 1 /* pixels */ 235 /* number of blank pixels before and after an expanded title */ 236 #define ICON_TITLE_TEXT_GAP_EXPANDED 4 /* pixels */ 237 /* extra blank pixels if the icon is sticky */ 238 #define ICON_TITLE_TO_STICK_EXTRA_GAP 1 /* pixels */ 239 /* minimum distance of icons in icon box */ 240 #define MIN_ICON_BOX_DIST 3 /* pixels */ 241 /* padding for the icon into its background */ 242 #define ICON_BACKGROUND_PADDING 0 /* pixels */ 243 244 /*** general keyboard shortcuts used in move, resize, ... ***/ 245 #define DEFAULT_KDB_SHORTCUT_MOVE_DISTANCE 5 /* pixels */ 246 #define KDB_SHORTCUT_MOVE_DISTANCE_SMALL 1 /* pixels */ 247 #define KDB_SHORTCUT_MOVE_DISTANCE_BIG 100 /* pixels */ 248 249 /*** movement ***/ 250 #define DEFAULT_OPAQUE_MOVE_SIZE 5 /* percent of window area */ 251 #define DEFAULT_SNAP_ATTRACTION 0 /* snap nothing */ 252 #define DEFAULT_SNAP_ATTRACTION_MODE 0x3 /* snap all */ 253 #define DEFAULT_SNAP_GRID_X 1 /* pixels */ 254 #define DEFAULT_SNAP_GRID_Y 1 /* pixels */ 255 256 /*** paging ***/ 257 #define DEFAULT_EDGE_SCROLL 100 /* % of screen width/height */ 258 /* Don't page if the pointer has moved for more than this many pixels between 259 * two samples */ 260 #define MAX_PAGING_MOVE_DISTANCE 5 /* pixels */ 261 #define DEFAULT_MOVE_DELAY 0 /* ms */ 262 #define DEFAULT_RESIZE_DELAY -1 /* pixels */ 263 #define DEFAULT_SCROLL_DELAY 0 /* ms */ 264 265 /*** layers ***/ 266 #define DEFAULT_BOTTOM_LAYER 2 267 #define DEFAULT_DEFAULT_LAYER 4 268 #define DEFAULT_TOP_LAYER 6 269 #define DEFAULT_ROOT_WINDOW_LAYER -1 270 271 /*** decorations ***/ 272 /* The number of left and right buttons must be equal. A maximum of 32 buttons 273 * can be handled (16 left and 16 right). */ 274 #define NR_LEFT_BUTTONS 5 275 #define NR_RIGHT_BUTTONS NR_LEFT_BUTTONS 276 #define NUMBER_OF_TITLE_BUTTONS (NR_LEFT_BUTTONS + NR_RIGHT_BUTTONS) 277 278 /*** window borders ***/ 279 #define DEFAULT_BORDER_WIDTH 1 /* pixels */ 280 #define DEFAULT_HANDLE_WIDTH 7 /* pixels */ 281 #define MAX_BORDER_WIDTH 500 /* pixels */ 282 #define MAX_HANDLE_WIDTH (MAX_BORDER_WIDTH) 283 284 /*** module configuration ***/ 285 #define MAX_MODULE_ALIAS_LEN 250 /* bytes */ 286 #define DEFAULT_MODULE_TIMEOUT 30 /* seconds */ 287 #define MAX_MODULE_INPUT_TEXT_LEN 1000 /* bytes */ 288 289 /*** FvwmConsole configuration */ 290 /* Maximum time FvwmConsole waits for the client to connect. */ 291 #define FVWMCONSOLE_CONNECTION_TO_SECS 60 /* seconds */ 292 293 294 /*** misc ***/ 295 #define DEFAULT_EMULATE_MWM False 296 #define DEFAULT_EMULATE_WIN False 297 298 #define DEFAULT_USE_ACTIVE_DOWN_BUTTONS True 299 #define DEFAULT_USE_INACTIVE_BUTTONS True 300 #define DEFAULT_USE_INACTIVE_DOWN_BUTTONS True 301 302 /*** Gradients ***/ 303 #define MAX_GRADIENT_SEGMENTS 1000 304 #define MAX_GRADIENT_COLORS 10000 305 306 /*** Xinerama ***/ 307 #define DEFAULT_XINERAMA_ENABLED True /* Xinerama on by default */ 308 #define XINERAMA_CONFIG_STRING "XineramaConfig" 309 /* Replace with -1 to switch off "primary screen" concept by default */ 310 #define DEFAULT_PRIMARY_SCREEN 0 311 312 /*** Very long window names (600000 characters or more) seem to hang the X 313 *** server. ***/ 314 #define MAX_WINDOW_NAME_LEN 200 /* characters */ 315 #define MAX_ICON_NAME_LEN 200 /* characters */ 316 /* not tested if this hangs the server too */ 317 #define MAX_RESOURCE_LEN 200 /* characters */ 318 #define MAX_CLASS_LEN 200 /* characters */ 319 320 /* The default title and icon title in case the user doesn't supply one. */ 321 #define DEFAULT_TITLE_FORMAT "%n" 322 #define DEFAULT_ICON_TITLE_FORMAT "%i" 323 324 /* Set the maximum size a visible name can be. */ 325 #define MAX_VISIBLE_NAME_LEN 4096 326 327 /*** numbered window names ***/ 328 #define MAX_WINDOW_NAME_NUMBER 999 329 #define MAX_WINDOW_NAME_NUMBER_DIGITS 3 /* number/digits of above number */ 330 331 /* focus policy style defaults */ 332 #define DEF_FP_FOCUS_ENTER 1 333 #define DEF_FP_UNFOCUS_LEAVE 1 334 #define DEF_FP_FOCUS_CLICK_CLIENT 0 335 #define DEF_FP_FOCUS_CLICK_DECOR 0 336 #define DEF_FP_FOCUS_BY_PROGRAM 1 337 #define DEF_FP_FOCUS_BY_FUNCTION 1 338 #define DEF_FP_WARP_POINTER_ON_FOCUS_FUNC 0 339 #define DEF_FP_LENIENT 0 340 #define DEF_FP_RAISE_FOCUSED_CLIENT_CLICK 0 341 #define DEF_FP_RAISE_UNFOCUSED_CLIENT_CLICK 1 342 #define DEF_FP_RAISE_FOCUSED_DECOR_CLICK 0 343 #define DEF_FP_RAISE_UNFOCUSED_DECOR_CLICK 0 344 #define DEF_FP_RAISE_FOCUSED_ICON_CLICK 0 345 #define DEF_FP_RAISE_UNFOCUSED_ICON_CLICK 0 346 /* use first three buttons by default */ 347 #define DEF_FP_MOUSE_BUTTONS ( \ 348 ((1 << 0) | (1 << 1) | (1 << 2)) & \ 349 ((1 << NUMBER_OF_MOUSE_BUTTONS) - 1)) 350 #define DEF_FP_MODIFIERS 0 351 #define DEF_FP_PASS_FOCUS_CLICK 1 352 #define DEF_FP_PASS_RAISE_CLICK 1 353 #define DEF_FP_IGNORE_FOCUS_CLICK_MOTION 0 354 #define DEF_FP_IGNORE_RAISE_CLICK_MOTION 0 355 #define DEF_FP_ALLOW_FUNC_FOCUS_CLICK 1 356 #define DEF_FP_ALLOW_FUNC_RAISE_CLICK 1 357 #define DEF_FP_GRAB_FOCUS 0 358 #define DEF_FP_GRAB_FOCUS_TRANSIENT 1 359 #define DEF_FP_OVERRIDE_GRAB_FOCUS 0 360 #define DEF_FP_RELEASE_FOCUS 0 361 #define DEF_FP_RELEASE_FOCUS_TRANSIENT 1 362 #define DEF_FP_OVERRIDE_RELEASE_FOCUS 0 363 #define DEF_FP_SORT_WINDOWLIST_BY 0 364 365 /* Function execution */ 366 #define MAX_FUNCTION_DEPTH 512 367 368 /* Tips */ 369 #define FTIPS_DEFAULT_PLACEMENT FTIPS_PLACEMENT_AUTO_UPDOWN 370 #define FTIPS_DEFAULT_JUSTIFICATION FTIPS_JUSTIFICATION_LEFT_UP 371 372 #define FTIPS_DEFAULT_PLACEMENT_OFFSET 3 373 #define FTIPS_DEFAULT_JUSTIFICATION_OFFSET 2 374 375 #define FTIPS_DEFAULT_BORDER_WIDTH 1 376 377 #endif /* _DEFAULTS_ */ 378 379