1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*--------------------------------*-C-*---------------------------------* |
2 | * File: xdefaults.c |
2 | * File: xdefaults.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * $Id: xdefaults.C,v 1.23 2004/04/02 18:00:01 pcg Exp $ |
|
|
5 | * |
4 | * |
6 | * All portions of code are copyright by their respective author/s. |
5 | * All portions of code are copyright by their respective author/s. |
7 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
6 | * Copyright (c) 1994 Robert Nation <nation@rocket.sanders.lockheed.com> |
8 | * - original version |
7 | * - original version |
9 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
8 | * Copyright (c) 1997,1998 mj olesen <olesen@me.queensu.ca> |
|
|
9 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
10 | * |
10 | * |
11 | * This program is free software; you can redistribute it and/or modify |
11 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by |
12 | * it under the terms of the GNU General Public License as published by |
13 | * the Free Software Foundation; either version 2 of the License, or |
13 | * the Free Software Foundation; either version 2 of the License, or |
14 | * (at your option) any later version. |
14 | * (at your option) any later version. |
… | |
… | |
109 | SWCH ("tr", Opt_transparent, NULL), |
109 | SWCH ("tr", Opt_transparent, NULL), |
110 | #if TINTING |
110 | #if TINTING |
111 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
111 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
112 | #endif |
112 | #endif |
113 | #endif |
113 | #endif |
|
|
114 | #ifdef OFF_FOCUS_FADING |
|
|
115 | STRG (Rs_fade, "fading", "fade", "%", "make colors x% darker when urxvt is losing focus."), |
|
|
116 | #endif |
|
|
117 | #ifdef TINTING |
|
|
118 | STRG (Rs_shade, "shading", "sh", "%", "shade background by x% when tinting."), |
|
|
119 | #endif |
114 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"), |
120 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, "utmp inhibit"), |
115 | #ifndef NO_BELL |
121 | #ifndef NO_BELL |
116 | BOOL (Rs_visualBell, "visualBell", "vb", Opt_visualBell, "visual bell"), |
122 | BOOL (Rs_visualBell, "visualBell", "vb", Opt_visualBell, "visual bell"), |
117 | # if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION) |
123 | # if ! defined(NO_MAPALERT) && defined(MAPALERT_OPTION) |
118 | BOOL (Rs_mapAlert, "mapAlert", NULL, Opt_mapAlert, NULL), |
124 | BOOL (Rs_mapAlert, "mapAlert", NULL, Opt_mapAlert, NULL), |
… | |
… | |
153 | RSTRG (Rs_color + minBrightCOLOR + 5, "color13", "color"), |
159 | RSTRG (Rs_color + minBrightCOLOR + 5, "color13", "color"), |
154 | RSTRG (Rs_color + minBrightCOLOR + 6, "color14", "color"), |
160 | RSTRG (Rs_color + minBrightCOLOR + 6, "color14", "color"), |
155 | RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"), |
161 | RSTRG (Rs_color + minBrightCOLOR + 7, "color15", "color"), |
156 | #endif /* NO_BRIGHTCOLOR */ |
162 | #endif /* NO_BRIGHTCOLOR */ |
157 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
163 | #ifndef NO_BOLD_UNDERLINE_REVERSE |
|
|
164 | BOOL (Rs_realBold, "realBold", "rb", Opt_realBold, "use bold fonts for bold text"), |
158 | RSTRG (Rs_color + Color_BD, "colorBD", "color"), |
165 | RSTRG (Rs_color + Color_BD, "colorBD", "color"), |
159 | RSTRG (Rs_color + Color_UL, "colorUL", "color"), |
166 | RSTRG (Rs_color + Color_UL, "colorUL", "color"), |
160 | RSTRG (Rs_color + Color_RV, "colorRV", "color"), |
167 | RSTRG (Rs_color + Color_RV, "colorRV", "color"), |
161 | #endif /* ! NO_BOLD_UNDERLINE_REVERSE */ |
168 | #endif /* ! NO_BOLD_UNDERLINE_REVERSE */ |
162 | #ifdef KEEP_SCROLLCOLOR |
169 | #ifdef KEEP_SCROLLCOLOR |
… | |
… | |
200 | #ifndef NO_FRILLS |
207 | #ifndef NO_FRILLS |
201 | STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"), |
208 | STRG (Rs_ext_bwidth, "externalBorder", "w", "number", "external border in pixels"), |
202 | STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL), |
209 | STRG (Rs_ext_bwidth, NULL, "bw", NULL, NULL), |
203 | STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), |
210 | STRG (Rs_ext_bwidth, NULL, "borderwidth", NULL, NULL), |
204 | STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), |
211 | STRG (Rs_int_bwidth, "internalBorder", "b", "number", "internal border in pixels"), |
|
|
212 | BOOL (Rs_borderLess, "borderLess", "bl", Opt_borderLess, "borderless window"), |
205 | #endif |
213 | #endif |
206 | #ifndef NO_LINESPACE |
214 | #ifndef NO_LINESPACE |
207 | STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"), |
215 | STRG (Rs_lineSpace, "lineSpace", "lsp", "number", "number of extra pixels between rows"), |
208 | #endif |
216 | #endif |
209 | STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"), |
217 | STRG (Rs_scrollBar_thickness, "thickness", "sbt", "number", "scrollbar thickness/width in pixels"), |
… | |
… | |
461 | |
469 | |
462 | if (entry < optList_size ()) |
470 | if (entry < optList_size ()) |
463 | { |
471 | { |
464 | if (optList_isReverse (entry)) |
472 | if (optList_isReverse (entry)) |
465 | flag = flag == On ? Off : On; |
473 | flag = flag == On ? Off : On; |
|
|
474 | |
466 | if (optList_strlen (entry)) |
475 | if (optList_strlen (entry)) |
467 | { /* string value */ |
|
|
468 | const char *str = argv[++i]; |
|
|
469 | |
|
|
470 | #ifdef DEBUG_RESOURCES |
|
|
471 | fprintf (stderr, "string (%s,%s) = ", |
|
|
472 | optList[entry].opt ? optList[entry].opt : "nil", |
|
|
473 | optList[entry].kw ? optList[entry].kw : "nil"); |
|
|
474 | #endif |
|
|
475 | if (flag == On && str && (optList[entry].doff != -1)) |
|
|
476 | { |
476 | { |
477 | #ifdef DEBUG_RESOURCES |
|
|
478 | fprintf (stderr, "\"%s\"\n", str); |
|
|
479 | #endif |
|
|
480 | rs[optList[entry].doff] = str; |
|
|
481 | /* |
477 | /* |
482 | * special cases are handled in main.c:main () to allow |
478 | * special cases are handled in main.c:main () to allow |
483 | * X resources to set these values before we settle for |
479 | * X resources to set these values before we settle for |
484 | * default values |
480 | * default values |
485 | */ |
481 | */ |
486 | } |
|
|
487 | #ifdef DEBUG_RESOURCES |
|
|
488 | else |
|
|
489 | fprintf (stderr, "???\n"); |
|
|
490 | #endif |
|
|
491 | |
482 | |
|
|
483 | if (optList[entry].doff != -1) |
|
|
484 | rs[optList[entry].doff] = flag == On && argv[i+1] |
|
|
485 | ? argv[++i] : 0; |
492 | } |
486 | } |
493 | else |
487 | else |
494 | { /* boolean value */ |
488 | { /* boolean value */ |
495 | #ifdef DEBUG_RESOURCES |
489 | #ifdef DEBUG_RESOURCES |
496 | fprintf (stderr, "boolean (%s,%s) = %s\n", |
490 | fprintf (stderr, "boolean (%s,%s) = %s\n", |