1 | =head1 NAME |
1 | =head1 NAME |
2 | |
2 | |
3 | urxvt - rxvt-unicode's embedded perl interpreter |
3 | rxvtperl - rxvt-unicode's embedded perl interpreter |
4 | |
4 | |
5 | =head1 SYNOPSIS |
5 | =head1 SYNOPSIS |
6 | |
6 | |
7 | Put your scripts into $LIBDIR/perl-init/, they will be loaded automatically. |
7 | * Put your scripts into F<@@RXVT_LIBDIR@@/urxvt/perl-ext/>, they will be loaded automatically. |
8 | |
8 | |
9 | Each script will only be loaded once, even in urxvtd, and will be valid |
9 | * Each script will only be loaded once, even in urxvtd, and will be valid |
10 | globally. |
10 | globally. |
11 | |
11 | |
12 | Scripts are evaluated in a 'use strict' and 'use utf8' environment, and |
12 | * Scripts are evaluated in a 'use strict' and 'use utf8' environment, and |
13 | thus must be written in utf-8. |
13 | thus must be encoded as UTF-8. |
14 | |
14 | |
15 | sub on_sel_grab { |
15 | sub on_sel_grab { |
16 | warn "you selected ", $_[0]->selection; |
16 | warn "you selected ", $_[0]->selection; |
|
|
17 | () |
17 | } |
18 | } |
18 | |
19 | |
19 | 1 |
20 | 1 |
20 | |
21 | |
21 | =head1 DESCRIPTION |
22 | =head1 DESCRIPTION |
… | |
… | |
226 | }; |
227 | }; |
227 | } |
228 | } |
228 | |
229 | |
229 | load_script $_ for grep -f $_, <$LIBDIR/perl-ext/*>; |
230 | load_script $_ for grep -f $_, <$LIBDIR/perl-ext/*>; |
230 | |
231 | |
231 | |
|
|
232 | =back |
232 | =back |
233 | |
233 | |
234 | =head2 The C<urxvt::term> Class |
234 | =head2 The C<urxvt::term> Class |
235 | |
235 | |
236 | =over 4 |
236 | =over 4 |
|
|
237 | |
|
|
238 | =item $value = $term->resource ($name[, $newval]) |
|
|
239 | |
|
|
240 | Returns the current resource value associated with a given name and |
|
|
241 | optionally sets a new value. Setting values is most useful in the C<init> |
|
|
242 | hook. Unset resources are returned and accepted as C<undef>. |
|
|
243 | |
|
|
244 | The new value must be properly encoded to a suitable character encoding |
|
|
245 | before passing it to this method. Similarly, the returned value may need |
|
|
246 | to be converted from the used encoding to text. |
|
|
247 | |
|
|
248 | Resource names are as defined in F<src/rsinc.h>. Colours can be specified |
|
|
249 | as resource names of the form C<< color+<index> >>, e.g. C<color+5>. (will |
|
|
250 | likely change). |
|
|
251 | |
|
|
252 | Please note that resource strings will currently only be freed when the |
|
|
253 | terminal is destroyed, so changing options frequently will eat memory. |
|
|
254 | |
|
|
255 | =cut |
|
|
256 | |
|
|
257 | sub urxvt::term::resource($$;$) { |
|
|
258 | my ($self, $name) = (shift, shift); |
|
|
259 | unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0); |
|
|
260 | goto &urxvt::term::_resource; |
|
|
261 | } |
237 | |
262 | |
238 | =item ($row, $col) = $term->selection_mark ([$row, $col]) |
263 | =item ($row, $col) = $term->selection_mark ([$row, $col]) |
239 | |
264 | |
240 | =item ($row, $col) = $term->selection_beg ([$row, $col]) |
265 | =item ($row, $col) = $term->selection_beg ([$row, $col]) |
241 | |
266 | |
… | |
… | |
390 | |
415 | |
391 | Stop watching for events on the given filehandle. |
416 | Stop watching for events on the given filehandle. |
392 | |
417 | |
393 | =back |
418 | =back |
394 | |
419 | |
|
|
420 | =head1 ENVIRONMENT |
|
|
421 | |
|
|
422 | =head2 URXVT_PERL_VERBOSITY |
|
|
423 | |
|
|
424 | This variable controls the verbosity level of the perl extension. Higher |
|
|
425 | numbers indicate more verbose output. |
|
|
426 | |
|
|
427 | =over 4 |
|
|
428 | |
|
|
429 | =item 0 - only fatal messages |
|
|
430 | |
|
|
431 | =item 3 - script loading and management |
|
|
432 | |
|
|
433 | =item 10 - all events received |
|
|
434 | |
|
|
435 | =back |
|
|
436 | |
395 | =head1 AUTHOR |
437 | =head1 AUTHOR |
396 | |
438 | |
397 | Marc Lehmann <pcg@goof.com> |
439 | Marc Lehmann <pcg@goof.com> |
398 | http://software.schmorp.de/pkg/rxvt-unicode |
440 | http://software.schmorp.de/pkg/rxvt-unicode |
399 | |
441 | |