… | |
… | |
240 | URxvt.tabbed.tab-bg: <colour-index, default 1> |
240 | URxvt.tabbed.tab-bg: <colour-index, default 1> |
241 | |
241 | |
242 | See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid |
242 | See I<COLOR AND GRAPHICS> in the @@RXVT_NAME@@(1) manpage for valid |
243 | indices. |
243 | indices. |
244 | |
244 | |
245 | =item mark-urls |
245 | =item matcher |
246 | |
246 | |
247 | Uses per-line display filtering (C<on_line_update>) to underline urls and |
247 | Uses per-line display filtering (C<on_line_update>) to underline text |
248 | make them clickable. When middle-clicked, the program specified in the |
248 | matching a certain pattern and make it clickable. When clicked with the |
249 | resource C<urlLauncher> (default C<x-www-browser>) will be started with |
249 | mouse button specified in the C<matcher.button> resource (default 2, or |
250 | the URL as first argument. |
250 | middle), the program specified in the C<matcher.launcher> resource |
|
|
251 | (default, the C<urlLauncher> resource, C<sensible-browser>) will be started |
|
|
252 | with the matched text as first argument. The default configuration is |
|
|
253 | suitable for matching URLs and launching a web browser, like the |
|
|
254 | former "mark-urls" extension. |
|
|
255 | |
|
|
256 | The default pattern to match URLs can be overridden with the |
|
|
257 | C<matcher.pattern.0> resource, and additional patterns can be specified |
|
|
258 | with numbered patterns, in a manner similar to the "selection" extension. |
|
|
259 | The launcher can also be overridden on a per-pattern basis. |
|
|
260 | |
|
|
261 | Example configuration: |
|
|
262 | |
|
|
263 | URxvt.perl-ext: default,matcher |
|
|
264 | URxvt.urlLauncher: sensible-browser |
|
|
265 | URxvt.matcher.button: 1 |
|
|
266 | URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] |
|
|
267 | URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) |
|
|
268 | URxvt.matcher.launcher.2: gvim +$2 $1 |
251 | |
269 | |
252 | =item xim-onthespot |
270 | =item xim-onthespot |
253 | |
271 | |
254 | This (experimental) perl extension implements OnTheSpot editing. It does |
272 | This (experimental) perl extension implements OnTheSpot editing. It does |
255 | not work perfectly, and some input methods don't seem to work well with |
273 | not work perfectly, and some input methods don't seem to work well with |
… | |
… | |
346 | in the C<selection-pastebin-url> resource (again, the % is the placeholder |
364 | in the C<selection-pastebin-url> resource (again, the % is the placeholder |
347 | for the filename): |
365 | for the filename): |
348 | |
366 | |
349 | URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% |
367 | URxvt.selection-pastebin.url: http://www.ta-sa.org/files/txt/% |
350 | |
368 | |
|
|
369 | I<Note to xrdb users:> xrdb uses the C preprocessor, which might interpret |
|
|
370 | the double C</> characters as comment start. Use C<\057\057> instead, |
|
|
371 | which works regardless of wether xrdb is used to parse the resource file |
|
|
372 | or not. |
|
|
373 | |
351 | =item example-refresh-hooks |
374 | =item example-refresh-hooks |
352 | |
375 | |
353 | Displays a very simple digital clock in the upper right corner of the |
376 | Displays a very simple digital clock in the upper right corner of the |
354 | window. Illustrates overwriting the refresh callbacks to create your own |
377 | window. Illustrates overwriting the refresh callbacks to create your own |
355 | overlays or changes. |
378 | overlays or changes. |
… | |
… | |
395 | =back |
418 | =back |
396 | |
419 | |
397 | =head2 Extension Objects |
420 | =head2 Extension Objects |
398 | |
421 | |
399 | Every perl extension is a perl class. A separate perl object is created |
422 | Every perl extension is a perl class. A separate perl object is created |
400 | for each terminal and each extension and passed as the first parameter to |
423 | for each terminal, and each terminal has its own set of extenion objects, |
401 | hooks. So extensions can use their C<$self> object without having to think |
424 | which are passed as the first parameter to hooks. So extensions can use |
402 | about other extensions, with the exception of methods and members that |
425 | their C<$self> object without having to think about clashes with other |
|
|
426 | extensions or other terminals, with the exception of methods and members |
403 | begin with an underscore character C<_>: these are reserved for internal |
427 | that begin with an underscore character C<_>: these are reserved for |
404 | use. |
428 | internal use. |
405 | |
429 | |
406 | Although it isn't a C<urxvt::term> object, you can call all methods of the |
430 | Although it isn't a C<urxvt::term> object, you can call all methods of the |
407 | C<urxvt::term> class on this object. |
431 | C<urxvt::term> class on this object. |
408 | |
432 | |
409 | It has the following methods and data members: |
433 | It has the following methods and data members: |
… | |
… | |
1086 | sub DESTROY { |
1110 | sub DESTROY { |
1087 | $_[0][1]->stop; |
1111 | $_[0][1]->stop; |
1088 | } |
1112 | } |
1089 | |
1113 | |
1090 | sub condvar { |
1114 | sub condvar { |
1091 | bless \my $flag, urxvt::anyevent::condvar:: |
1115 | bless \my $flag, urxvt::anyevent:: |
1092 | } |
1116 | } |
1093 | |
1117 | |
1094 | sub urxvt::anyevent::condvar::broadcast { |
1118 | sub broadcast { |
1095 | ${$_[0]}++; |
1119 | ${$_[0]}++; |
1096 | } |
1120 | } |
1097 | |
1121 | |
1098 | sub urxvt::anyevent::condvar::wait { |
1122 | sub wait { |
1099 | unless (${$_[0]}) { |
1123 | unless (${$_[0]}) { |
1100 | Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; |
1124 | Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; |
1101 | } |
1125 | } |
|
|
1126 | } |
|
|
1127 | |
|
|
1128 | sub one_event { |
|
|
1129 | Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API"; |
1102 | } |
1130 | } |
1103 | |
1131 | |
1104 | package urxvt::term; |
1132 | package urxvt::term; |
1105 | |
1133 | |
1106 | =head2 The C<urxvt::term> Class |
1134 | =head2 The C<urxvt::term> Class |
… | |
… | |
1926 | |
1954 | |
1927 | =cut |
1955 | =cut |
1928 | |
1956 | |
1929 | package urxvt::watcher; |
1957 | package urxvt::watcher; |
1930 | |
1958 | |
1931 | @urxvt::timer::ISA = __PACKAGE__; |
|
|
1932 | @urxvt::iow::ISA = __PACKAGE__; |
|
|
1933 | @urxvt::pw::ISA = __PACKAGE__; |
|
|
1934 | @urxvt::iw::ISA = __PACKAGE__; |
|
|
1935 | |
|
|
1936 | =head2 The C<urxvt::timer> Class |
1959 | =head2 The C<urxvt::timer> Class |
1937 | |
1960 | |
1938 | This class implements timer watchers/events. Time is represented as a |
1961 | This class implements timer watchers/events. Time is represented as a |
1939 | fractional number of seconds since the epoch. Example: |
1962 | fractional number of seconds since the epoch. Example: |
1940 | |
1963 | |