… | |
… | |
107 | #endif |
107 | #endif |
108 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
108 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
109 | BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), |
109 | BOOL (Rs_scrollTtyOutput, NULL, "si", Opt_scrollTtyOutput, Optflag_Reverse, "scroll-on-tty-output inhibit"), |
110 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
110 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
111 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
111 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
112 | #if TRANSPARENT |
112 | #if ENABLE_TRANSPARENCY |
113 | BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), |
113 | BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), |
114 | SWCH ("tr", Opt_transparent, 0, NULL), |
114 | SWCH ("tr", Opt_transparent, 0, NULL), |
115 | # if TINTING |
|
|
116 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
115 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
117 | # endif |
116 | STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."), |
118 | #endif |
117 | #endif |
119 | #if OFF_FOCUS_FADING |
118 | #if OFF_FOCUS_FADING |
120 | STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"), |
119 | STRG (Rs_fade, "fading", "fade", "%", "fade colors x% percent when rxvt-unicode is losing focus"), |
121 | STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), |
120 | STRG (Rs_color + Color_fade, "fadeColor", "fadecolor", "color", "target color for off-focus fading"), |
122 | #endif |
|
|
123 | #if TINTING |
|
|
124 | STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."), |
|
|
125 | #endif |
121 | #endif |
126 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
122 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
127 | #ifndef NO_BELL |
123 | #ifndef NO_BELL |
128 | # if ENABLE_FRILLS |
124 | # if ENABLE_FRILLS |
129 | BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), |
125 | BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), |
… | |
… | |
190 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
186 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
191 | #endif /* NO_CURSORCOLOR */ |
187 | #endif /* NO_CURSORCOLOR */ |
192 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
188 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
193 | STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), |
189 | STRG (Rs_color + Color_pointer_bg, "pointerColor2", "pr2", "color", "pointer bg color"), |
194 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
190 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
195 | #ifdef XPM_BACKGROUND |
191 | #ifdef BG_IMAGE_FROM_FILE |
196 | RSTRG (Rs_path, "path", "search path"), |
192 | RSTRG (Rs_path, "path", "search path"), |
197 | STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), |
193 | STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), |
198 | #endif |
194 | #endif |
199 | /* fonts: command-line option = resource name */ |
195 | /* fonts: command-line option = resource name */ |
200 | STRG (Rs_font, "font", "fn", "fontname", "normal text font"), |
196 | STRG (Rs_font, "font", "fn", "fontname", "normal text font"), |
… | |
… | |
265 | #if ISO_14755 |
261 | #if ISO_14755 |
266 | BOOL (Rs_iso14755_52, "iso14755_52", NULL, Opt_iso14755_52, 0, NULL), |
262 | BOOL (Rs_iso14755_52, "iso14755_52", NULL, Opt_iso14755_52, 0, NULL), |
267 | #endif |
263 | #endif |
268 | #ifdef HAVE_AFTERIMAGE |
264 | #ifdef HAVE_AFTERIMAGE |
269 | STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), |
265 | STRG (Rs_blendtype, "blendType", "blt", "string", "background image blending type - alpha, tint, etc..."), |
270 | STRG (Rs_blurradius, "blurRadius", "blr", "number", "Gaussian Blur radius to apply to the root background"), |
266 | STRG (Rs_blurradius, "blurRadius", "blr", "HxV", "Gaussian Blur radii to apply to the root background"), |
271 | #endif |
267 | #endif |
272 | #ifndef NO_RESOURCES |
268 | #ifndef NO_RESOURCES |
273 | INFO ("xrm", "string", "X resource"), |
269 | INFO ("xrm", "string", "X resource"), |
274 | #endif |
270 | #endif |
275 | INFO ("e", "command arg ...", "command to execute") |
271 | INFO ("e", "command arg ...", "command to execute") |
… | |
… | |
322 | #endif |
318 | #endif |
323 | "," |
319 | "," |
324 | #if OFF_FOCUS_FADING |
320 | #if OFF_FOCUS_FADING |
325 | "fade," |
321 | "fade," |
326 | #endif |
322 | #endif |
327 | #if defined(XPM_BACKGROUND) |
|
|
328 | "XPM," |
|
|
329 | #endif |
|
|
330 | #if defined(TRANSPARENT) |
323 | #if defined(ENABLE_TRANSPARENCY) |
331 | "transparent," |
324 | "transparent," |
332 | #endif |
|
|
333 | #if TINTING |
|
|
334 | "tint," |
325 | "tint," |
|
|
326 | #endif |
|
|
327 | #if HAVE_AFTERIMAGE |
|
|
328 | "afterimage," |
335 | #endif |
329 | #endif |
336 | #if defined(USE_XIM) |
330 | #if defined(USE_XIM) |
337 | "XIM," |
331 | "XIM," |
338 | #endif |
332 | #endif |
339 | #if defined(NO_BACKSPACE_KEY) |
333 | #if defined(NO_BACKSPACE_KEY) |
… | |
… | |
553 | * default values |
547 | * default values |
554 | */ |
548 | */ |
555 | |
549 | |
556 | if (optList[entry].doff != -1) |
550 | if (optList[entry].doff != -1) |
557 | { |
551 | { |
558 | if (flag == resval_on && !argv [i+1]) |
552 | if (flag == resval_on && i+1 == argc) |
559 | rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); |
553 | rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); |
560 | |
554 | |
561 | rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; |
555 | rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; |
562 | } |
556 | } |
563 | } |
557 | } |
… | |
… | |
569 | rs[optList[entry].doff] = flag; |
563 | rs[optList[entry].doff] = flag; |
570 | } |
564 | } |
571 | } |
565 | } |
572 | else |
566 | else |
573 | #ifdef KEYSYM_RESOURCE |
567 | #ifdef KEYSYM_RESOURCE |
574 | /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ |
568 | if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) |
575 | if (rxvt_Str_match (opt, "keysym.")) |
|
|
576 | { |
569 | { |
577 | const char *str = argv[++i]; |
570 | if (i+1 < argc) |
578 | |
|
|
579 | if (str != NULL) |
|
|
580 | parse_keysym (opt + sizeof ("keysym.") - 1, str); |
571 | parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); |
581 | } |
572 | } |
582 | else |
573 | else |
583 | #endif |
574 | #endif |
584 | { |
575 | { |
585 | bad_option = 1; |
576 | bad_option = 1; |
… | |
… | |
676 | char *newarg = NULL; |
667 | char *newarg = NULL; |
677 | char newargstr[NEWARGLIM]; |
668 | char newargstr[NEWARGLIM]; |
678 | |
669 | |
679 | if (arg == NULL) |
670 | if (arg == NULL) |
680 | { |
671 | { |
681 | if ((n = rxvt_Str_match (str, "keysym.")) == 0) |
672 | n = sizeof ("keysym.") - 1; |
|
|
673 | if (strncmp (str, "keysym.", n)) |
682 | return 0; |
674 | return 0; |
683 | |
675 | |
684 | str += n; /* skip `keysym.' */ |
676 | str += n; /* skip `keysym.' */ |
685 | if (!(pmodend = strchr (str, ':'))) |
677 | if (!(pmodend = strchr (str, ':'))) |
686 | return -1; |
678 | return -1; |
… | |
… | |
759 | strncpy (newargstr, arg, NEWARGLIM - 1); |
751 | strncpy (newargstr, arg, NEWARGLIM - 1); |
760 | newargstr[NEWARGLIM - 1] = '\0'; |
752 | newargstr[NEWARGLIM - 1] = '\0'; |
761 | newarg = newargstr; |
753 | newarg = newargstr; |
762 | } |
754 | } |
763 | |
755 | |
764 | rxvt_Str_trim (newarg); |
756 | if (*newarg == '\0') |
765 | if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0) |
|
|
766 | return -1; |
757 | return -1; |
767 | |
758 | |
768 | keyboard->register_user_translation (sym, state, newarg); |
759 | keyboard->register_user_translation (sym, state, newarg); |
769 | return 1; |
760 | return 1; |
770 | } |
761 | } |
… | |
… | |
783 | XrmGetResource (database, resource, resource, &type, &result); |
774 | XrmGetResource (database, resource, resource, &type, &result); |
784 | |
775 | |
785 | return result.addr; |
776 | return result.addr; |
786 | } |
777 | } |
787 | |
778 | |
788 | const char * |
779 | static const char * |
789 | rxvt_term::x_resource (const char *name) |
780 | x_resource (const char *name) |
790 | { |
781 | { |
791 | XrmDatabase database = XrmGetDatabase (dpy); |
782 | XrmDatabase database = XrmGetDatabase (dpy); |
792 | |
783 | |
793 | const char *p = get_res (database, rs[Rs_name], name); |
784 | const char *p = get_res (database, rs[Rs_name], name); |
794 | const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); |
785 | const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); |