… | |
… | |
93 | SWCH ("iconic", Opt_iconic, 0, "start iconic"), |
93 | SWCH ("iconic", Opt_iconic, 0, "start iconic"), |
94 | SWCH ("ic", Opt_iconic, 0, NULL), /* short form */ |
94 | SWCH ("ic", Opt_iconic, 0, NULL), /* short form */ |
95 | BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"), |
95 | BOOL (Rs_reverseVideo, "reverseVideo", "rv", Opt_reverseVideo, 0, "reverse video"), |
96 | BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"), |
96 | BOOL (Rs_loginShell, "loginShell", "ls", Opt_loginShell, 0, "login shell"), |
97 | BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"), |
97 | BOOL (Rs_jumpScroll, "jumpScroll", "j", Opt_jumpScroll, 0, "jump scrolling"), |
|
|
98 | BOOL (Rs_skipScroll, "skipScroll", "ss", Opt_skipScroll, 0, "skip scrolling"), |
98 | BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, 0, "tab characters are pastable"), |
99 | BOOL (Rs_pastableTabs, "pastableTabs", "ptab", Opt_pastableTabs, 0, "tab characters are pastable"), |
99 | #if HAVE_SCROLLBARS |
100 | #if HAVE_SCROLLBARS |
100 | RSTRG (Rs_scrollstyle, "scrollstyle", "mode"), |
101 | RSTRG (Rs_scrollstyle, "scrollstyle", "mode"), |
101 | BOOL (Rs_scrollBar, "scrollBar", "sb", Opt_scrollBar, 0, "scrollbar"), |
102 | BOOL (Rs_scrollBar, "scrollBar", "sb", Opt_scrollBar, 0, "scrollbar"), |
102 | BOOL (Rs_scrollBar_right, "scrollBar_right", "sr", Opt_scrollBar_right, 0, "scrollbar right"), |
103 | BOOL (Rs_scrollBar_right, "scrollBar_right", "sr", Opt_scrollBar_right, 0, "scrollbar right"), |
… | |
… | |
106 | #endif |
107 | #endif |
107 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
108 | BOOL (Rs_scrollTtyOutput, "scrollTtyOutput", NULL, Opt_scrollTtyOutput, 0, NULL), |
108 | 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"), |
109 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
110 | BOOL (Rs_scrollTtyKeypress, "scrollTtyKeypress", "sk", Opt_scrollTtyKeypress, 0, "scroll-on-keypress"), |
110 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
111 | BOOL (Rs_scrollWithBuffer, "scrollWithBuffer", "sw", Opt_scrollWithBuffer, 0, "scroll-with-buffer"), |
111 | #if TRANSPARENT |
112 | #if ENABLE_TRANSPARENCY |
112 | BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), |
113 | BOOL (Rs_transparent, "inheritPixmap", "ip", Opt_transparent, 0, "inherit parent pixmap"), |
113 | SWCH ("tr", Opt_transparent, 0, NULL), |
114 | SWCH ("tr", Opt_transparent, 0, NULL), |
114 | # if TINTING |
|
|
115 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
115 | STRG (Rs_color + Color_tint, "tintColor", "tint", "color", "tint color"), |
116 | # endif |
116 | STRG (Rs_shade, "shading", "sh", "%", "shade background by x %."), |
117 | #endif |
117 | #endif |
118 | #if OFF_FOCUS_FADING |
118 | #if OFF_FOCUS_FADING |
119 | 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"), |
120 | 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"), |
121 | #endif |
|
|
122 | #if TINTING |
|
|
123 | STRG (Rs_shade, "shading", "sh", "%", "shade background by x % when tinting."), |
|
|
124 | #endif |
121 | #endif |
125 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
122 | BOOL (Rs_utmpInhibit, "utmpInhibit", "ut", Opt_utmpInhibit, 0, "utmp inhibit"), |
126 | #ifndef NO_BELL |
123 | #ifndef NO_BELL |
127 | # if ENABLE_FRILLS |
124 | # if ENABLE_FRILLS |
128 | BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), |
125 | BOOL (Rs_urgentOnBell, "urgentOnBell", NULL, Opt_urgentOnBell, 0, NULL), |
… | |
… | |
189 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
186 | RSTRG (Rs_color + Color_cursor2, "cursorColor2", "color"), |
190 | #endif /* NO_CURSORCOLOR */ |
187 | #endif /* NO_CURSORCOLOR */ |
191 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
188 | STRG (Rs_color + Color_pointer_fg, "pointerColor", "pr", "color", "pointer color"), |
192 | 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"), |
193 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
190 | STRG (Rs_color + Color_border, "borderColor", "bd", "color", "border color"), |
194 | #ifdef XPM_BACKGROUND |
191 | #ifdef BG_IMAGE_FROM_FILE |
195 | RSTRG (Rs_path, "path", "search path"), |
192 | RSTRG (Rs_path, "path", "search path"), |
196 | STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), |
193 | STRG (Rs_backgroundPixmap, "backgroundPixmap", "pixmap", "file[;geom]", "background pixmap"), |
197 | #endif |
194 | #endif |
198 | /* fonts: command-line option = resource name */ |
195 | /* fonts: command-line option = resource name */ |
199 | STRG (Rs_font, "font", "fn", "fontname", "normal text font"), |
196 | STRG (Rs_font, "font", "fn", "fontname", "normal text font"), |
… | |
… | |
264 | #if ISO_14755 |
261 | #if ISO_14755 |
265 | 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), |
266 | #endif |
263 | #endif |
267 | #ifdef HAVE_AFTERIMAGE |
264 | #ifdef HAVE_AFTERIMAGE |
268 | 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..."), |
269 | 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"), |
270 | #endif |
267 | #endif |
271 | #ifndef NO_RESOURCES |
268 | #ifndef NO_RESOURCES |
272 | INFO ("xrm", "string", "X resource"), |
269 | INFO ("xrm", "string", "X resource"), |
273 | #endif |
270 | #endif |
274 | INFO ("e", "command arg ...", "command to execute") |
271 | INFO ("e", "command arg ...", "command to execute") |
… | |
… | |
321 | #endif |
318 | #endif |
322 | "," |
319 | "," |
323 | #if OFF_FOCUS_FADING |
320 | #if OFF_FOCUS_FADING |
324 | "fade," |
321 | "fade," |
325 | #endif |
322 | #endif |
326 | #if defined(XPM_BACKGROUND) |
|
|
327 | "XPM," |
|
|
328 | #endif |
|
|
329 | #if defined(TRANSPARENT) |
323 | #if defined(ENABLE_TRANSPARENCY) |
330 | "transparent," |
324 | "transparent," |
331 | #endif |
|
|
332 | #if TINTING |
|
|
333 | "tint," |
325 | "tint," |
|
|
326 | #endif |
|
|
327 | #if HAVE_AFTERIMAGE |
|
|
328 | "afterimage," |
334 | #endif |
329 | #endif |
335 | #if defined(USE_XIM) |
330 | #if defined(USE_XIM) |
336 | "XIM," |
331 | "XIM," |
337 | #endif |
332 | #endif |
338 | #if defined(NO_BACKSPACE_KEY) |
333 | #if defined(NO_BACKSPACE_KEY) |
… | |
… | |
552 | * default values |
547 | * default values |
553 | */ |
548 | */ |
554 | |
549 | |
555 | if (optList[entry].doff != -1) |
550 | if (optList[entry].doff != -1) |
556 | { |
551 | { |
557 | if (flag == resval_on && !argv [i+1]) |
552 | if (flag == resval_on && i+1 == argc) |
558 | rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); |
553 | rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); |
559 | |
554 | |
560 | rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; |
555 | rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; |
561 | } |
556 | } |
562 | } |
557 | } |
… | |
… | |
568 | rs[optList[entry].doff] = flag; |
563 | rs[optList[entry].doff] = flag; |
569 | } |
564 | } |
570 | } |
565 | } |
571 | else |
566 | else |
572 | #ifdef KEYSYM_RESOURCE |
567 | #ifdef KEYSYM_RESOURCE |
573 | /* if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) */ |
568 | if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) |
574 | if (rxvt_Str_match (opt, "keysym.")) |
|
|
575 | { |
569 | { |
576 | const char *str = argv[++i]; |
570 | if (i+1 < argc) |
577 | |
|
|
578 | if (str != NULL) |
|
|
579 | parse_keysym (opt + sizeof ("keysym.") - 1, str); |
571 | parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); |
580 | } |
572 | } |
581 | else |
573 | else |
582 | #endif |
574 | #endif |
583 | { |
575 | { |
584 | bad_option = 1; |
576 | bad_option = 1; |
… | |
… | |
675 | char *newarg = NULL; |
667 | char *newarg = NULL; |
676 | char newargstr[NEWARGLIM]; |
668 | char newargstr[NEWARGLIM]; |
677 | |
669 | |
678 | if (arg == NULL) |
670 | if (arg == NULL) |
679 | { |
671 | { |
680 | if ((n = rxvt_Str_match (str, "keysym.")) == 0) |
672 | n = sizeof ("keysym.") - 1; |
|
|
673 | if (strncmp (str, "keysym.", n)) |
681 | return 0; |
674 | return 0; |
682 | |
675 | |
683 | str += n; /* skip `keysym.' */ |
676 | str += n; /* skip `keysym.' */ |
684 | if (!(pmodend = strchr (str, ':'))) |
677 | if (!(pmodend = strchr (str, ':'))) |
685 | return -1; |
678 | return -1; |
… | |
… | |
758 | strncpy (newargstr, arg, NEWARGLIM - 1); |
751 | strncpy (newargstr, arg, NEWARGLIM - 1); |
759 | newargstr[NEWARGLIM - 1] = '\0'; |
752 | newargstr[NEWARGLIM - 1] = '\0'; |
760 | newarg = newargstr; |
753 | newarg = newargstr; |
761 | } |
754 | } |
762 | |
755 | |
763 | rxvt_Str_trim (newarg); |
756 | if (*newarg == '\0') |
764 | if (*newarg == '\0' || (n = rxvt_Str_escaped (newarg)) == 0) |
|
|
765 | return -1; |
757 | return -1; |
766 | |
758 | |
767 | keyboard->register_user_translation (sym, state, newarg); |
759 | keyboard->register_user_translation (sym, state, newarg); |
768 | return 1; |
760 | return 1; |
769 | } |
761 | } |
… | |
… | |
782 | XrmGetResource (database, resource, resource, &type, &result); |
774 | XrmGetResource (database, resource, resource, &type, &result); |
783 | |
775 | |
784 | return result.addr; |
776 | return result.addr; |
785 | } |
777 | } |
786 | |
778 | |
787 | const char * |
779 | static const char * |
788 | rxvt_term::x_resource (const char *name) |
780 | x_resource (const char *name) |
789 | { |
781 | { |
790 | XrmDatabase database = XrmGetDatabase (dpy); |
782 | XrmDatabase database = XrmGetDatabase (dpy); |
791 | |
783 | |
792 | const char *p = get_res (database, rs[Rs_name], name); |
784 | const char *p = get_res (database, rs[Rs_name], name); |
793 | const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); |
785 | const char *p0 = get_res (database, "!INVALIDPROGRAMMENAMEDONTMATCH!", name); |