… | |
… | |
129 | .\" ======================================================================== |
129 | .\" ======================================================================== |
130 | .\" |
130 | .\" |
131 | .IX Title "rxvt 3" |
131 | .IX Title "rxvt 3" |
132 | .TH rxvt 3 "2006-01-02" "6.2" "RXVT-UNICODE" |
132 | .TH rxvt 3 "2006-01-02" "6.2" "RXVT-UNICODE" |
133 | .SH "NAME" |
133 | .SH "NAME" |
134 | rxvtperl \- rxvt\-unicode's embedded perl interpreter |
134 | @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter |
135 | .SH "SYNOPSIS" |
135 | .SH "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
136 | .IX Header "SYNOPSIS" |
137 | * Put your scripts into \fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR, they will be loaded automatically. |
137 | .Vb 1 |
138 | .PP |
138 | \& # create a file grab_test in $HOME: |
139 | * Scripts are evaluated in a 'use strict' and 'use utf8' environment, and |
139 | .Ve |
140 | thus must be encoded as \s-1UTF\-8\s0. |
|
|
141 | .PP |
140 | .PP |
142 | .Vb 4 |
141 | .Vb 4 |
143 | \& sub on_sel_grab { |
142 | \& sub on_sel_grab { |
144 | \& warn "you selected ", $_[0]->selection; |
143 | \& warn "you selected ", $_[0]->selection; |
145 | \& () |
144 | \& () |
146 | \& } |
145 | \& } |
147 | .Ve |
146 | .Ve |
148 | .PP |
147 | .PP |
149 | .Vb 1 |
148 | .Vb 1 |
150 | \& 1 |
149 | \& # start a @@RXVT_NAME@@ using it: |
|
|
150 | .Ve |
|
|
151 | .PP |
|
|
152 | .Vb 1 |
|
|
153 | \& @@RXVT_NAME@@ --perl-lib $HOME -pe grab_test |
151 | .Ve |
154 | .Ve |
152 | .SH "DESCRIPTION" |
155 | .SH "DESCRIPTION" |
153 | .IX Header "DESCRIPTION" |
156 | .IX Header "DESCRIPTION" |
154 | Everytime a terminal object gets created, scripts specified via the |
157 | Everytime a terminal object gets created, scripts specified via the |
155 | \&\f(CW\*(C`perl\*(C'\fR resource are associated with it. |
158 | \&\f(CW\*(C`perl\*(C'\fR resource are loaded and associated with it. |
|
|
159 | .PP |
|
|
160 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
|
|
161 | thus must be encoded as \s-1UTF\-8\s0. |
156 | .PP |
162 | .PP |
157 | Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where |
163 | Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where |
158 | scripts will be shared (But not enabled) for all terminals. |
164 | scripts will be shared (But not enabled) for all terminals. |
159 | .Sh "General \s-1API\s0 Considerations" |
165 | .Sh "General \s-1API\s0 Considerations" |
160 | .IX Subsection "General API Considerations" |
166 | .IX Subsection "General API Considerations" |
… | |
… | |
250 | code is run after this hook, and takes precedence. |
256 | code is run after this hook, and takes precedence. |
251 | .ie n .IP "on_refresh_end $term" 4 |
257 | .ie n .IP "on_refresh_end $term" 4 |
252 | .el .IP "on_refresh_end \f(CW$term\fR" 4 |
258 | .el .IP "on_refresh_end \f(CW$term\fR" 4 |
253 | .IX Item "on_refresh_end $term" |
259 | .IX Item "on_refresh_end $term" |
254 | Called just after the screen gets redrawn. See \f(CW\*(C`on_refresh_begin\*(C'\fR. |
260 | Called just after the screen gets redrawn. See \f(CW\*(C`on_refresh_begin\*(C'\fR. |
|
|
261 | .ie n .IP "on_keyboard_command $term\fR, \f(CW$string" 4 |
|
|
262 | .el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4 |
|
|
263 | .IX Item "on_keyboard_command $term, $string" |
|
|
264 | Called whenever the user presses a key combination that has a |
|
|
265 | \&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR |
|
|
266 | resource in the @@RXVT_NAME@@(1) manpage). |
255 | .ie n .Sh "Functions in the ""urxvt"" Package" |
267 | .ie n .Sh "Functions in the ""urxvt"" Package" |
256 | .el .Sh "Functions in the \f(CWurxvt\fP Package" |
268 | .el .Sh "Functions in the \f(CWurxvt\fP Package" |
257 | .IX Subsection "Functions in the urxvt Package" |
269 | .IX Subsection "Functions in the urxvt Package" |
258 | .ie n .IP "urxvt::fatal $errormessage" 4 |
270 | .ie n .IP "urxvt::fatal $errormessage" 4 |
259 | .el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 |
271 | .el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 |