… | |
… | |
42 | <p>rxvtperl - rxvt-unicode's embedded perl interpreter</p> |
42 | <p>rxvtperl - rxvt-unicode's embedded perl interpreter</p> |
43 | <p> |
43 | <p> |
44 | </p> |
44 | </p> |
45 | <hr /> |
45 | <hr /> |
46 | <h1><a name="synopsis">SYNOPSIS</a></h1> |
46 | <h1><a name="synopsis">SYNOPSIS</a></h1> |
47 | <p>* Put your scripts into <em>/opt/rxvt/lib/urxvt/perl-ext/</em>, they will be loaded automatically.</p> |
47 | <pre> |
48 | <p>* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and |
48 | # create a file grab_test in $HOME:</pre> |
49 | thus must be encoded as UTF-8.</p> |
|
|
50 | <pre> |
49 | <pre> |
51 | sub on_sel_grab { |
50 | sub on_sel_grab { |
52 | warn "you selected ", $_[0]->selection; |
51 | warn "you selected ", $_[0]->selection; |
53 | () |
52 | () |
54 | }</pre> |
53 | }</pre> |
55 | <pre> |
54 | <pre> |
56 | 1</pre> |
55 | # start a rxvt using it:</pre> |
|
|
56 | <pre> |
|
|
57 | rxvt --perl-lib $HOME -pe grab_test</pre> |
57 | <p> |
58 | <p> |
58 | </p> |
59 | </p> |
59 | <hr /> |
60 | <hr /> |
60 | <h1><a name="description">DESCRIPTION</a></h1> |
61 | <h1><a name="description">DESCRIPTION</a></h1> |
61 | <p>Everytime a terminal object gets created, scripts specified via the |
62 | <p>Everytime a terminal object gets created, scripts specified via the |
62 | <code>perl</code> resource are associated with it.</p> |
63 | <code>perl</code> resource are loaded and associated with it.</p> |
|
|
64 | <p>Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
|
|
65 | thus must be encoded as UTF-8.</p> |
63 | <p>Each script will only ever be loaded once, even in rxvtd, where |
66 | <p>Each script will only ever be loaded once, even in rxvtd, where |
64 | scripts will be shared (But not enabled) for all terminals.</p> |
67 | scripts will be shared (But not enabled) for all terminals.</p> |
65 | <p> |
68 | <p> |
66 | </p> |
69 | </p> |
67 | <h2><a name="general_api_considerations">General API Considerations</a></h2> |
70 | <h2><a name="general_api_considerations">General API Considerations</a></h2> |
… | |
… | |
181 | <p></p> |
184 | <p></p> |
182 | <dt><strong><a name="item_on_refresh_end__24term">on_refresh_end $term</a></strong><br /> |
185 | <dt><strong><a name="item_on_refresh_end__24term">on_refresh_end $term</a></strong><br /> |
183 | </dt> |
186 | </dt> |
184 | <dd> |
187 | <dd> |
185 | Called just after the screen gets redrawn. See <code>on_refresh_begin</code>. |
188 | Called just after the screen gets redrawn. See <code>on_refresh_begin</code>. |
|
|
189 | </dd> |
|
|
190 | <p></p> |
|
|
191 | <dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br /> |
|
|
192 | </dt> |
|
|
193 | <dd> |
|
|
194 | Called whenever the user presses a key combination that has a |
|
|
195 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
|
|
196 | resource in the <code>rxvt(1)</code> manpage). |
186 | </dd> |
197 | </dd> |
187 | <p></p></dl> |
198 | <p></p></dl> |
188 | <p> |
199 | <p> |
189 | </p> |
200 | </p> |
190 | <h2><a name="functions_in_the_urxvt_package">Functions in the <code>urxvt</code> Package</a></h2> |
201 | <h2><a name="functions_in_the_urxvt_package">Functions in the <code>urxvt</code> Package</a></h2> |