… | |
… | |
43 | |
43 | |
44 | Or by adding them to the resource for extensions loaded by default: |
44 | Or by adding them to the resource for extensions loaded by default: |
45 | |
45 | |
46 | URxvt.perl-ext-common: default,selection-autotransform |
46 | URxvt.perl-ext-common: default,selection-autotransform |
47 | |
47 | |
48 | Extensions that add command line parameters or resources on their own are |
48 | Extensions may add resources on their own. Similarly to builtin |
49 | loaded automatically when used. |
49 | resources, these resources can also be specified on the command line |
|
|
50 | as long options (with '.' replaced by '-'), in which case the |
|
|
51 | corresponding extension is loaded automatically. |
50 | |
52 | |
51 | =head1 API DOCUMENTATION |
53 | =head1 API DOCUMENTATION |
52 | |
54 | |
53 | =head2 General API Considerations |
55 | =head2 General API Considerations |
54 | |
56 | |
… | |
… | |
677 | @TERM_EXT = (); |
679 | @TERM_EXT = (); |
678 | $TERM->register_package ($_) for @pkg; |
680 | $TERM->register_package ($_) for @pkg; |
679 | } |
681 | } |
680 | |
682 | |
681 | for ( |
683 | for ( |
682 | grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2 |
684 | (grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2), |
|
|
685 | @{ delete $TERM->{perl_ext_3} } |
683 | ) { |
686 | ) { |
684 | if ($_ eq "default") { |
687 | if ($_ eq "default") { |
685 | |
688 | |
686 | $ext_arg{$_} = [] |
689 | $ext_arg{$_} = [] |
687 | for |
690 | for |
688 | qw(selection option-popup selection-popup readline), |
691 | qw(selection option-popup selection-popup readline), |
689 | @{ delete $TERM->{perl_ext_3} }, |
|
|
690 | map $_->[0], values %{ $TERM->{meta}{binding} }; |
692 | map $_->[0], values %{ $TERM->{meta}{binding} }; |
691 | |
693 | |
692 | for ($TERM->_keysym_resources) { |
694 | for ($TERM->_keysym_resources) { |
693 | next if /^(?:string|command|builtin|builtin-string|perl)/; |
695 | next if /^(?:string|command|builtin|builtin-string|perl)/; |
694 | next unless /^([A-Za-z0-9_\-]+):/; |
696 | next unless /^([A-Za-z0-9_\-]+):/; |
… | |
… | |
1273 | Returns the X-Resource for the given pattern, excluding the program or |
1275 | Returns the X-Resource for the given pattern, excluding the program or |
1274 | class name, i.e. C<< $term->x_resource ("boldFont") >> should return the |
1276 | class name, i.e. C<< $term->x_resource ("boldFont") >> should return the |
1275 | same value as used by this instance of rxvt-unicode. Returns C<undef> if no |
1277 | same value as used by this instance of rxvt-unicode. Returns C<undef> if no |
1276 | resource with that pattern exists. |
1278 | resource with that pattern exists. |
1277 | |
1279 | |
1278 | Extensions that define extra resource or command line arguments also need |
1280 | Extensions that define extra resources also need to call this method |
1279 | to call this method to access their values. |
1281 | to access their values. |
1280 | |
1282 | |
1281 | If the method is called on an extension object (basically, from an |
1283 | If the method is called on an extension object (basically, from an |
1282 | extension), then the special prefix C<%.> will be replaced by the name of |
1284 | extension), then the special prefix C<%.> will be replaced by the name of |
1283 | the extension and a dot, and the lone string C<%> will be replaced by the |
1285 | the extension and a dot, and the lone string C<%> will be replaced by the |
1284 | extension name itself. This makes it possible to code extensions so you |
1286 | extension name itself. This makes it possible to code extensions so you |