1 | NAME |
1 | NAME |
2 | urxvtperl - rxvt-unicode's embedded perl interpreter |
2 | rxvtperl - rxvt-unicode's embedded perl interpreter |
3 | |
3 | |
4 | SYNOPSIS |
4 | SYNOPSIS |
5 | # create a file grab_test in $HOME: |
5 | # create a file grab_test in $HOME: |
6 | |
6 | |
7 | sub on_sel_grab { |
7 | sub on_sel_grab { |
8 | warn "you selected ", $_[0]->selection; |
8 | warn "you selected ", $_[0]->selection; |
9 | () |
9 | () |
10 | } |
10 | } |
11 | |
11 | |
12 | # start a urxvt using it: |
12 | # start a rxvt using it: |
13 | |
13 | |
14 | urxvt --perl-lib $HOME -pe grab_test |
14 | rxvt --perl-lib $HOME -pe grab_test |
15 | |
15 | |
16 | DESCRIPTION |
16 | DESCRIPTION |
17 | Everytime a terminal object gets created, extension scripts specified |
17 | Everytime a terminal object gets created, extension scripts specified |
18 | via the "perl" resource are loaded and associated with it. |
18 | via the "perl" resource are loaded and associated with it. |
19 | |
19 | |
20 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
20 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
21 | thus must be encoded as UTF-8. |
21 | thus must be encoded as UTF-8. |
22 | |
22 | |
23 | Each script will only ever be loaded once, even in urxvtd, where scripts |
23 | Each script will only ever be loaded once, even in rxvtd, where scripts |
24 | will be shared (but not enabled) for all terminals. |
24 | will be shared (but not enabled) for all terminals. |
25 | |
25 | |
26 | PREPACKAGED EXTENSIONS |
26 | PREPACKAGED EXTENSIONS |
27 | This section describes the extensions delivered with this release. You |
27 | This section describes the extensions delivered with this release. You |
28 | can find them in /usr/local/lib/urxvt/perl/. |
28 | can find them in /opt/rxvt/lib/urxvt/perl/. |
29 | |
29 | |
30 | You can activate them like this: |
30 | You can activate them like this: |
31 | |
31 | |
32 | urxvt -pe <extensionname> |
32 | rxvt -pe <extensionname> |
33 | |
33 | |
34 | selection (enabled by default) |
34 | selection (enabled by default) |
35 | (More) intelligent selection. This extension tries to be more |
35 | (More) intelligent selection. This extension tries to be more |
36 | intelligent when the user extends selections (double-click and |
36 | intelligent when the user extends selections (double-click and |
37 | further clicks). Right now, it tries to select words, urls and |
37 | further clicks). Right now, it tries to select words, urls and |
… | |
… | |
318 | Called just after the screen gets redrawn. See "on_refresh_begin". |
318 | Called just after the screen gets redrawn. See "on_refresh_begin". |
319 | |
319 | |
320 | on_keyboard_command $term, $string |
320 | on_keyboard_command $term, $string |
321 | Called whenever the user presses a key combination that has a |
321 | Called whenever the user presses a key combination that has a |
322 | "perl:string" action bound to it (see description of the keysym |
322 | "perl:string" action bound to it (see description of the keysym |
323 | resource in the urxvt(1) manpage). |
323 | resource in the rxvt(1) manpage). |
324 | |
324 | |
325 | on_x_event $term, $event |
325 | on_x_event $term, $event |
326 | Called on every X event received on the vt window (and possibly |
326 | Called on every X event received on the vt window (and possibly |
327 | other windows). Should only be used as a last resort. Most event |
327 | other windows). Should only be used as a last resort. Most event |
328 | structure members are not passed. |
328 | structure members are not passed. |
… | |
… | |
474 | initialise perl, and the terminal object otherwise. The "init" and |
474 | initialise perl, and the terminal object otherwise. The "init" and |
475 | "start" hooks will be called during this call. |
475 | "start" hooks will be called during this call. |
476 | |
476 | |
477 | $term->destroy |
477 | $term->destroy |
478 | Destroy the terminal object (close the window, free resources etc.). |
478 | Destroy the terminal object (close the window, free resources etc.). |
479 | Please note that urxvt will not exit as long as any event watchers |
479 | Please note that rxvt will not exit as long as any event watchers |
480 | (timers, io watchers) are still active. |
480 | (timers, io watchers) are still active. |
481 | |
481 | |
482 | $isset = $term->option ($optval[, $set]) |
482 | $isset = $term->option ($optval[, $set]) |
483 | Returns true if the option specified by $optval is enabled, and |
483 | Returns true if the option specified by $optval is enabled, and |
484 | optionally change it. All option values are stored by name in the |
484 | optionally change it. All option values are stored by name in the |
… | |
… | |
539 | there is only one resource database per display, and later |
539 | there is only one resource database per display, and later |
540 | invocations might return the wrong resources. |
540 | invocations might return the wrong resources. |
541 | |
541 | |
542 | $success = $term->parse_keysym ($keysym_spec, $command_string) |
542 | $success = $term->parse_keysym ($keysym_spec, $command_string) |
543 | Adds a keymap translation exactly as specified via a resource. See |
543 | Adds a keymap translation exactly as specified via a resource. See |
544 | the "keysym" resource in the urxvt(1) manpage. |
544 | the "keysym" resource in the rxvt(1) manpage. |
545 | |
545 | |
546 | $rend = $term->rstyle ([$new_rstyle]) |
546 | $rend = $term->rstyle ([$new_rstyle]) |
547 | Return and optionally change the current rendition. Text that is |
547 | Return and optionally change the current rendition. Text that is |
548 | output by the terminal application will use this style. |
548 | output by the terminal application will use this style. |
549 | |
549 | |
… | |
… | |
686 | $terminal_columns = $term->ncol |
686 | $terminal_columns = $term->ncol |
687 | $has_focus = $term->focus |
687 | $has_focus = $term->focus |
688 | $is_mapped = $term->mapped |
688 | $is_mapped = $term->mapped |
689 | $max_scrollback = $term->saveLines |
689 | $max_scrollback = $term->saveLines |
690 | $nrow_plus_saveLines = $term->total_rows |
690 | $nrow_plus_saveLines = $term->total_rows |
691 | $lines_in_scrollback = $term->nsaved |
691 | $topmost_scrollback_row = $term->top_row |
692 | Return various integers describing terminal characteristics. |
692 | Return various integers describing terminal characteristics. |
693 | |
693 | |
694 | $x_display = $term->display_id |
694 | $x_display = $term->display_id |
695 | Return the DISPLAY used by rxvt-unicode. |
695 | Return the DISPLAY used by rxvt-unicode. |
696 | |
696 | |
… | |
… | |
707 | Return the modifier masks corresponding to the "ISO Level 3 Shift" |
707 | Return the modifier masks corresponding to the "ISO Level 3 Shift" |
708 | (often AltGr), the meta key (often Alt) and the num lock key, if |
708 | (often AltGr), the meta key (often Alt) and the num lock key, if |
709 | applicable. |
709 | applicable. |
710 | |
710 | |
711 | $view_start = $term->view_start ([$newvalue]) |
711 | $view_start = $term->view_start ([$newvalue]) |
712 | Returns the negative row number of the topmost line. Minimum value |
712 | Returns the row number of the topmost displayed line. Maximum value |
713 | is 0, which displays the normal terminal contents. Larger values |
713 | is 0, which displays the normal terminal contents. Lower values |
714 | scroll this many lines into the scrollback buffer. |
714 | scroll this many lines into the scrollback buffer. |
715 | |
715 | |
716 | $term->want_refresh |
716 | $term->want_refresh |
717 | Requests a screen refresh. At the next opportunity, rxvt-unicode |
717 | Requests a screen refresh. At the next opportunity, rxvt-unicode |
718 | will compare the on-screen display with its stored representation. |
718 | will compare the on-screen display with its stored representation. |