… | |
… | |
45 | |
45 | |
46 | URxvt.perl-ext-common: default,selection-autotransform |
46 | URxvt.perl-ext-common: default,selection-autotransform |
47 | |
47 | |
48 | Extensions may add additional resources and C<actions>, i.e., methods |
48 | Extensions may add additional resources and C<actions>, i.e., methods |
49 | which can be bound to a key and invoked by the user. An extension can |
49 | which can be bound to a key and invoked by the user. An extension can |
50 | define the resources it support and also default bindings for one or |
50 | define the resources it support using so called META comments, |
51 | more actions it provides using so called META comments, described |
|
|
52 | below. Similarly to builtin resources, extension resources can also be |
51 | described below. Similarly to builtin resources, extension resources |
53 | specified on the command line as long options (with C<.> replaced by |
52 | can also be specified on the command line as long options (with C<.> |
54 | C<->), in which case the corresponding extension is loaded |
53 | replaced by C<->), in which case the corresponding extension is loaded |
55 | automatically. For this to work the extension B<must> define META |
54 | automatically. For this to work the extension B<must> define META |
56 | comments for its resources. |
55 | comments for its resources. |
57 | |
56 | |
58 | =head1 API DOCUMENTATION |
57 | =head1 API DOCUMENTATION |
59 | |
58 | |
… | |
… | |
118 | =head2 META comments |
117 | =head2 META comments |
119 | |
118 | |
120 | Rxvt-unicode recognizes special meta comments in extensions that define |
119 | Rxvt-unicode recognizes special meta comments in extensions that define |
121 | different types of metadata. |
120 | different types of metadata. |
122 | |
121 | |
123 | Currently, it recxognises only one such comment: |
122 | Currently, it recognises only one such comment: |
124 | |
123 | |
125 | =over 4 |
124 | =over 4 |
126 | |
125 | |
127 | =item #:META:RESOURCE:name:type:desc |
126 | =item #:META:RESOURCE:name:type:desc |
128 | |
127 | |
… | |
… | |
1349 | =item $success = $term->bind_action ($key, $action) |
1348 | =item $success = $term->bind_action ($key, $action) |
1350 | |
1349 | |
1351 | Adds a key binding exactly as specified via a C<keysym> resource. See the |
1350 | Adds a key binding exactly as specified via a C<keysym> resource. See the |
1352 | C<keysym> resource in the urxvt(1) manpage. |
1351 | C<keysym> resource in the urxvt(1) manpage. |
1353 | |
1352 | |
1354 | To add default bindings for an extension, the extension should call C<< |
1353 | To add default bindings for actions, an extension should call C<< |
1355 | ->bind_action >> on it's C<init> hook for every such binding. Doing it |
1354 | ->bind_action >> in its C<init> hook for every such binding. Doing it |
1356 | in the C<init> hook allows users the override or remove the the binding |
1355 | in the C<init> hook allows users to override or remove the binding |
1357 | again. |
1356 | again. |
1358 | |
1357 | |
1359 | Example: the C<searchable-scrollback> by default binds itself |
1358 | Example: the C<searchable-scrollback> by default binds itself |
1360 | on C<Meta-s>, using C<< $self->bind_action >>, which calls C<< |
1359 | on C<Meta-s>, using C<< $self->bind_action >>, which calls C<< |
1361 | $term->bind_action >>. |
1360 | $term->bind_action >>. |