1 | NAME |
1 | NAME |
2 | rxvtperl - rxvt-unicode's embedded perl interpreter |
2 | rxvtperl - rxvt-unicode's embedded perl interpreter |
3 | |
3 | |
4 | SYNOPSIS |
4 | SYNOPSIS |
5 | * Put your scripts into /opt/rxvt/lib/urxvt/perl-ext/, they will be |
5 | # create a file grab_test in $HOME: |
6 | loaded automatically. |
|
|
7 | |
|
|
8 | * Scripts are evaluated in a 'use strict' and 'use utf8' environment, |
|
|
9 | and thus must be encoded as UTF-8. |
|
|
10 | |
6 | |
11 | sub on_sel_grab { |
7 | sub on_sel_grab { |
12 | warn "you selected ", $_[0]->selection; |
8 | warn "you selected ", $_[0]->selection; |
13 | () |
9 | () |
14 | } |
10 | } |
15 | |
11 | |
16 | 1 |
12 | # start a rxvt using it: |
|
|
13 | |
|
|
14 | rxvt --perl-lib $HOME -pe grab_test |
17 | |
15 | |
18 | DESCRIPTION |
16 | DESCRIPTION |
19 | On startup, rxvt will scan /opt/rxvt/lib/urxvt/perl-ext/ for files and |
17 | Everytime a terminal object gets created, scripts specified via the |
20 | will load them. Everytime a terminal object gets created, the directory |
18 | "perl" resource are loaded and associated with it. |
21 | specified by the "perl-lib" resource will be additionally scanned. |
19 | |
|
|
20 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
|
|
21 | thus must be encoded as UTF-8. |
22 | |
22 | |
23 | Each script will only ever be loaded once, even in rxvtd, where scripts |
23 | Each script will only ever be loaded once, even in rxvtd, where scripts |
24 | will be shared for all terminals. |
24 | will be shared (But not enabled) for all terminals. |
25 | |
|
|
26 | Hooks in scripts specified by "perl-lib" will only be called for the |
|
|
27 | terminals created with that specific option value. |
|
|
28 | |
25 | |
29 | General API Considerations |
26 | General API Considerations |
30 | All objects (such as terminals, time watchers etc.) are typical |
27 | All objects (such as terminals, time watchers etc.) are typical |
31 | reference-to-hash objects. The hash can be used to store anything you |
28 | reference-to-hash objects. The hash can be used to store anything you |
32 | like. All members starting with an underscore (such as "_ptr" or |
29 | like. All members starting with an underscore (such as "_ptr" or |
… | |
… | |
112 | display code is run after this hook, and takes precedence. |
109 | display code is run after this hook, and takes precedence. |
113 | |
110 | |
114 | on_refresh_end $term |
111 | on_refresh_end $term |
115 | Called just after the screen gets redrawn. See "on_refresh_begin". |
112 | Called just after the screen gets redrawn. See "on_refresh_begin". |
116 | |
113 | |
|
|
114 | on_keyboard_command $term, $string |
|
|
115 | Called whenever the user presses a key combination that has a |
|
|
116 | "perl:string" action bound to it (see description of the keysym |
|
|
117 | resource in the rxvt(1) manpage). |
|
|
118 | |
117 | Functions in the "urxvt" Package |
119 | Functions in the "urxvt" Package |
118 | urxvt::fatal $errormessage |
120 | urxvt::fatal $errormessage |
119 | Fatally aborts execution with the given error message. Avoid at all |
121 | Fatally aborts execution with the given error message. Avoid at all |
120 | costs! The only time this is acceptable is when the terminal process |
122 | costs! The only time this is acceptable is when the terminal process |
121 | starts up. |
123 | starts up. |
… | |
… | |
155 | |
157 | |
156 | answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont |
158 | answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont |
157 | borderLess color cursorBlink cursorUnderline cutchars delete_key |
159 | borderLess color cursorBlink cursorUnderline cutchars delete_key |
158 | display_name embed ext_bwidth fade font geometry hold iconName |
160 | display_name embed ext_bwidth fade font geometry hold iconName |
159 | imFont imLocale inputMethod insecure int_bwidth intensityStyles |
161 | imFont imLocale inputMethod insecure int_bwidth intensityStyles |
160 | italicFont jumpScroll lineSpace loginShell mapAlert menu meta8 |
162 | italicFont jumpScroll lineSpace loginShell mapAlert menu meta8 modifier |
161 | modifier mouseWheelScrollPage name pastableTabs path perl perl_eval |
163 | mouseWheelScrollPage name pastableTabs path perl_eval perl_ext |
162 | perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd |
164 | perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd |
163 | reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating |
165 | reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating |
164 | scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput |
166 | scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput |
165 | scrollWithBuffer scrollstyle secondaryScreen secondaryScroll selectstyle |
167 | scrollWithBuffer scrollstyle secondaryScreen secondaryScroll selectstyle |
166 | shade term_name title transparent transparent_all tripleclickwords |
168 | shade term_name title transparent transparent_all tripleclickwords |