… | |
… | |
127 | .\} |
127 | .\} |
128 | .rm #[ #] #H #V #F C |
128 | .rm #[ #] #H #V #F C |
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-03" "6.2" "RXVT-UNICODE" |
133 | .SH "NAME" |
133 | .SH "NAME" |
134 | @@RXVT_NAME@@perl \- 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 | .Vb 1 |
137 | .Vb 1 |
… | |
… | |
160 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
160 | Scripts are compiled in a 'use strict' and 'use utf8' environment, and |
161 | thus must be encoded as \s-1UTF\-8\s0. |
161 | thus must be encoded as \s-1UTF\-8\s0. |
162 | .PP |
162 | .PP |
163 | 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 |
164 | scripts will be shared (But not enabled) for all terminals. |
164 | scripts will be shared (But not enabled) for all terminals. |
|
|
165 | .SH "PACKAGED EXTENSIONS" |
|
|
166 | .IX Header "PACKAGED EXTENSIONS" |
|
|
167 | This section describes the extensiosn delivered with this version. You can |
|
|
168 | find them in \fI@@RXVT_LIBDIR@@/urxvt/perl/\fR. |
|
|
169 | .PP |
|
|
170 | You can activate them like this: |
|
|
171 | .PP |
|
|
172 | .Vb 1 |
|
|
173 | \& @@RXVT_NAME@@ -pe <extensionname> |
|
|
174 | .Ve |
|
|
175 | .IP "selection" 4 |
|
|
176 | .IX Item "selection" |
|
|
177 | Miscellaneous selection modifications. |
|
|
178 | .RS 4 |
|
|
179 | .IP "rot13" 4 |
|
|
180 | .IX Item "rot13" |
|
|
181 | Rot\-13 the selection when activated. Used via keyboard trigger: |
|
|
182 | .Sp |
|
|
183 | .Vb 1 |
|
|
184 | \& URxvt.keysym.C-M-r: perl:selection:rot13 |
|
|
185 | .Ve |
|
|
186 | .RE |
|
|
187 | .RS 4 |
|
|
188 | .RE |
|
|
189 | .IP "digital-clock" 4 |
|
|
190 | .IX Item "digital-clock" |
|
|
191 | Displays a very simple digital clock in the upper right corner of the |
|
|
192 | window. Illustrates overwriting the refresh callbacks to create your own |
|
|
193 | overlays or changes. |
|
|
194 | .IP "simple-overlay-clock" 4 |
|
|
195 | .IX Item "simple-overlay-clock" |
|
|
196 | Displays a digital clock using the built-in overlay (colorful, useless). |
165 | .Sh "General \s-1API\s0 Considerations" |
197 | .Sh "General \s-1API\s0 Considerations" |
166 | .IX Subsection "General API Considerations" |
198 | .IX Subsection "General API Considerations" |
167 | All objects (such as terminals, time watchers etc.) are typical |
199 | All objects (such as terminals, time watchers etc.) are typical |
168 | reference-to-hash objects. The hash can be used to store anything you |
200 | reference-to-hash objects. The hash can be used to store anything you |
169 | like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or |
201 | like. All members starting with an underscore (such as \f(CW\*(C`_ptr\*(C'\fR or |
… | |
… | |
383 | .IX Item "$string = $term->locale_decode $octets" |
415 | .IX Item "$string = $term->locale_decode $octets" |
384 | Convert the given locale-encoded octets into a perl string. |
416 | Convert the given locale-encoded octets into a perl string. |
385 | .IP "$term\->tt_write ($octets)" 4 |
417 | .IP "$term\->tt_write ($octets)" 4 |
386 | .IX Item "$term->tt_write ($octets)" |
418 | .IX Item "$term->tt_write ($octets)" |
387 | Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To |
419 | Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To |
388 | pass characters instead of octets, you should convetr you strings first to |
420 | pass characters instead of octets, you should convert your strings first |
389 | the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR. |
421 | to the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR. |
|
|
422 | .ie n .IP "$nrow = $term\->nrow" 4 |
|
|
423 | .el .IP "$nrow = \f(CW$term\fR\->nrow" 4 |
|
|
424 | .IX Item "$nrow = $term->nrow" |
|
|
425 | .PD 0 |
|
|
426 | .ie n .IP "$ncol = $term\->ncol" 4 |
|
|
427 | .el .IP "$ncol = \f(CW$term\fR\->ncol" 4 |
|
|
428 | .IX Item "$ncol = $term->ncol" |
|
|
429 | .PD |
|
|
430 | Return the number of rows/columns of the terminal window (i.e. as |
|
|
431 | specified by \f(CW\*(C`\-geometry\*(C'\fR, excluding any scrollback). |
|
|
432 | .ie n .IP "$nsaved = $term\->nsaved" 4 |
|
|
433 | .el .IP "$nsaved = \f(CW$term\fR\->nsaved" 4 |
|
|
434 | .IX Item "$nsaved = $term->nsaved" |
|
|
435 | Returns the number of lines in the scrollback buffer. |
|
|
436 | .ie n .IP "$view_start = $term\->view_start ([$newvalue])" 4 |
|
|
437 | .el .IP "$view_start = \f(CW$term\fR\->view_start ([$newvalue])" 4 |
|
|
438 | .IX Item "$view_start = $term->view_start ([$newvalue])" |
|
|
439 | Returns the negative row number of the topmost line. Minimum value is |
|
|
440 | \&\f(CW0\fR, which displays the normal terminal contents. Larger values scroll |
|
|
441 | this many lines into the scrollback buffer. |
|
|
442 | .IP "$term\->want_refresh" 4 |
|
|
443 | .IX Item "$term->want_refresh" |
|
|
444 | Requests a screen refresh. At the next opportunity, rxvt-unicode will |
|
|
445 | compare the on-screen display with its stored representation. If they |
|
|
446 | differ, it redraws the differences. |
|
|
447 | .Sp |
|
|
448 | Used after changing terminal contents to display them. |
|
|
449 | .ie n .IP "$text = $term\fR\->ROW_t ($row_number[, \f(CW$new_text\fR[, \f(CW$start_col]])" 4 |
|
|
450 | .el .IP "$text = \f(CW$term\fR\->ROW_t ($row_number[, \f(CW$new_text\fR[, \f(CW$start_col\fR]])" 4 |
|
|
451 | .IX Item "$text = $term->ROW_t ($row_number[, $new_text[, $start_col]])" |
|
|
452 | Returns the text of the entire row with number \f(CW$row_number\fR. Row \f(CW0\fR |
|
|
453 | is the topmost terminal line, row \f(CW\*(C`$term\->$ncol\-1\*(C'\fR is the bottommost |
|
|
454 | terminal line. The scrollback buffer starts at line \f(CW\*(C`\-1\*(C'\fR and extends to |
|
|
455 | line \f(CW\*(C`\-$term\->nsaved\*(C'\fR. |
|
|
456 | .Sp |
|
|
457 | If \f(CW$new_text\fR is specified, it will replace characters in the current |
|
|
458 | line, starting at column \f(CW$start_col\fR (default \f(CW0\fR), which is useful |
|
|
459 | to replace only parts of a line. The font iindex in the rendition will |
|
|
460 | automatically be updated. |
|
|
461 | .Sp |
|
|
462 | \&\f(CW$text\fR is in a special encoding: tabs and wide characters that use more |
|
|
463 | than one cell when displayed are padded with urxvt::NOCHAR characters |
|
|
464 | (\f(CW\*(C`chr 65535\*(C'\fR). Characters with combining characters and other characters |
|
|
465 | that do not fit into the normal tetx encoding will be replaced with |
|
|
466 | characters in the private use area. |
|
|
467 | .Sp |
|
|
468 | You have to obey this encoding when changing text. The advantage is |
|
|
469 | that \f(CW\*(C`substr\*(C'\fR and similar functions work on screen cells and not on |
|
|
470 | characters. |
|
|
471 | .Sp |
|
|
472 | The methods \f(CW\*(C`$term\->special_encode\*(C'\fR and \f(CW\*(C`$term\->special_decode\*(C'\fR |
|
|
473 | can be used to convert normal strings into this encoding and vice versa. |
|
|
474 | .ie n .IP "$rend = $term\fR\->ROW_r ($row_number[, \f(CW$new_rend\fR[, \f(CW$start_col]])" 4 |
|
|
475 | .el .IP "$rend = \f(CW$term\fR\->ROW_r ($row_number[, \f(CW$new_rend\fR[, \f(CW$start_col\fR]])" 4 |
|
|
476 | .IX Item "$rend = $term->ROW_r ($row_number[, $new_rend[, $start_col]])" |
|
|
477 | Like \f(CW\*(C`$term\->ROW_t\*(C'\fR, but returns an arrayref with rendition |
|
|
478 | bitsets. Rendition bitsets contain information about colour, font, font |
|
|
479 | styles and similar information. See also \f(CW\*(C`$term\->ROW_t\*(C'\fR. |
|
|
480 | .Sp |
|
|
481 | When setting rendition, the font mask will be ignored. |
|
|
482 | .Sp |
|
|
483 | See the section on \s-1RENDITION\s0, below. |
|
|
484 | .ie n .IP "$length = $term\fR\->ROW_l ($row_number[, \f(CW$new_length])" 4 |
|
|
485 | .el .IP "$length = \f(CW$term\fR\->ROW_l ($row_number[, \f(CW$new_length\fR])" 4 |
|
|
486 | .IX Item "$length = $term->ROW_l ($row_number[, $new_length])" |
|
|
487 | Returns the number of screen cells that are in use (\*(L"the line length\*(R"). If |
|
|
488 | it is \f(CW\*(C`\-1\*(C'\fR, then the line is part of a multiple-row logical \*(L"line\*(R", which |
|
|
489 | means all characters are in use and it is continued on the next row. |
|
|
490 | .ie n .IP "$text = $term\fR\->special_encode \f(CW$string" 4 |
|
|
491 | .el .IP "$text = \f(CW$term\fR\->special_encode \f(CW$string\fR" 4 |
|
|
492 | .IX Item "$text = $term->special_encode $string" |
|
|
493 | Converts a perl string into the special encoding used by rxvt\-unicode, |
|
|
494 | where one character corresponds to one screen cell. See |
|
|
495 | \&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details. |
|
|
496 | .ie n .IP "$string = $term\fR\->special_decode \f(CW$text" 4 |
|
|
497 | .el .IP "$string = \f(CW$term\fR\->special_decode \f(CW$text\fR" 4 |
|
|
498 | .IX Item "$string = $term->special_decode $text" |
|
|
499 | Converts rxvt-unicodes text reprsentation into a perl string. See |
|
|
500 | \&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details. |
|
|
501 | .Sh "\s-1RENDITION\s0" |
|
|
502 | .IX Subsection "RENDITION" |
|
|
503 | Rendition bitsets contain information about colour, font, font styles and |
|
|
504 | similar information for each screen cell. |
|
|
505 | .PP |
|
|
506 | The following \*(L"macros\*(R" deal with changes in rendition sets. You should |
|
|
507 | never just create a bitset, you should always modify an existing one, |
|
|
508 | as they contain important information required for correct operation of |
|
|
509 | rxvt\-unicode. |
|
|
510 | .IP "$rend = urxvt::DEFAULT_RSTYLE" 4 |
|
|
511 | .IX Item "$rend = urxvt::DEFAULT_RSTYLE" |
|
|
512 | Returns the default rendition, as used when the terminal is starting up or |
|
|
513 | being reset. Useful as a base |
390 | .ie n .Sh "The ""urxvt::timer"" Class" |
514 | .ie n .Sh "The ""urxvt::timer"" Class" |
391 | .el .Sh "The \f(CWurxvt::timer\fP Class" |
515 | .el .Sh "The \f(CWurxvt::timer\fP Class" |
392 | .IX Subsection "The urxvt::timer Class" |
516 | .IX Subsection "The urxvt::timer Class" |
393 | This class implements timer watchers/events. Time is represented as a |
517 | This class implements timer watchers/events. Time is represented as a |
394 | fractional number of seconds since the epoch. Example: |
518 | fractional number of seconds since the epoch. Example: |