… | |
… | |
127 | .\} |
127 | .\} |
128 | .rm #[ #] #H #V #F C |
128 | .rm #[ #] #H #V #F C |
129 | .\" ======================================================================== |
129 | .\" ======================================================================== |
130 | .\" |
130 | .\" |
131 | .IX Title "@@RXVT_NAME@@ 3" |
131 | .IX Title "@@RXVT_NAME@@ 3" |
132 | .TH @@RXVT_NAME@@ 3 "2007-10-27" "8.4" "RXVT-UNICODE" |
132 | .TH @@RXVT_NAME@@ 3 "2007-11-19" "8.4" "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 |
… | |
… | |
177 | .Ve |
177 | .Ve |
178 | .PP |
178 | .PP |
179 | Or by adding them to the resource for extensions loaded by default: |
179 | Or by adding them to the resource for extensions loaded by default: |
180 | .PP |
180 | .PP |
181 | .Vb 1 |
181 | .Vb 1 |
182 | \& URxvt.perl-ext-common: default,automove-background,selection-autotransform |
182 | \& URxvt.perl-ext-common: default,selection-autotransform |
183 | .Ve |
183 | .Ve |
184 | .IP "selection (enabled by default)" 4 |
184 | .IP "selection (enabled by default)" 4 |
185 | .IX Item "selection (enabled by default)" |
185 | .IX Item "selection (enabled by default)" |
186 | (More) intelligent selection. This extension tries to be more intelligent |
186 | (More) intelligent selection. This extension tries to be more intelligent |
187 | when the user extends selections (double\-click and further clicks). Right |
187 | when the user extends selections (double\-click and further clicks). Right |
… | |
… | |
242 | .Sp |
242 | .Sp |
243 | Other extensions can extend this popup menu by pushing a code reference |
243 | Other extensions can extend this popup menu by pushing a code reference |
244 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{option_popup_hook} }>, which gets called whenever the |
244 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{option_popup_hook} }>, which gets called whenever the |
245 | popup is being displayed. |
245 | popup is being displayed. |
246 | .Sp |
246 | .Sp |
247 | It's sole argument is the popup menu, which can be modified. It should |
247 | Its sole argument is the popup menu, which can be modified. It should |
248 | either return nothing or a string, the initial boolean value and a code |
248 | either return nothing or a string, the initial boolean value and a code |
249 | reference. The string will be used as button text and the code reference |
249 | reference. The string will be used as button text and the code reference |
250 | will be called when the toggle changes, with the new boolean value as |
250 | will be called when the toggle changes, with the new boolean value as |
251 | first argument. |
251 | first argument. |
252 | .Sp |
252 | .Sp |
… | |
… | |
266 | .Sp |
266 | .Sp |
267 | Other extensions can extend this popup menu by pushing a code reference |
267 | Other extensions can extend this popup menu by pushing a code reference |
268 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, which gets called whenever the |
268 | onto \f(CW\*(C`@{ $term\-\*(C'\fR{selection_popup_hook} }>, which gets called whenever the |
269 | popup is being displayed. |
269 | popup is being displayed. |
270 | .Sp |
270 | .Sp |
271 | It's sole argument is the popup menu, which can be modified. The selection |
271 | Its sole argument is the popup menu, which can be modified. The selection |
272 | is in \f(CW$_\fR, which can be used to decide whether to add something or not. |
272 | is in \f(CW$_\fR, which can be used to decide whether to add something or not. |
273 | It should either return nothing or a string and a code reference. The |
273 | It should either return nothing or a string and a code reference. The |
274 | string will be used as button text and the code reference will be called |
274 | string will be used as button text and the code reference will be called |
275 | when the button gets activated and should transform \f(CW$_\fR. |
275 | when the button gets activated and should transform \f(CW$_\fR. |
276 | .Sp |
276 | .Sp |
… | |
… | |
278 | the selection to \f(CW\*(C`b\*(C'\fRs, but only if the selection currently contains any |
278 | the selection to \f(CW\*(C`b\*(C'\fRs, but only if the selection currently contains any |
279 | \&\f(CW\*(C`a\*(C'\fRs: |
279 | \&\f(CW\*(C`a\*(C'\fRs: |
280 | .Sp |
280 | .Sp |
281 | .Vb 4 |
281 | .Vb 4 |
282 | \& push @{ $self->{term}{selection_popup_hook} }, sub { |
282 | \& push @{ $self->{term}{selection_popup_hook} }, sub { |
283 | \& /a/ ? ("a to be" => sub { s/a/b/g } |
283 | \& /a/ ? ("a to b" => sub { s/a/b/g } |
284 | \& : () |
284 | \& : () |
285 | \& }; |
285 | \& }; |
286 | .Ve |
286 | .Ve |
287 | .IP "searchable\-scrollback<hotkey> (enabled by default)" 4 |
287 | .IP "searchable\-scrollback<hotkey> (enabled by default)" 4 |
288 | .IX Item "searchable-scrollback<hotkey> (enabled by default)" |
288 | .IX Item "searchable-scrollback<hotkey> (enabled by default)" |
… | |
… | |
428 | .Ve |
428 | .Ve |
429 | .IP "xim-onthespot" 4 |
429 | .IP "xim-onthespot" 4 |
430 | .IX Item "xim-onthespot" |
430 | .IX Item "xim-onthespot" |
431 | This (experimental) perl extension implements OnTheSpot editing. It does |
431 | This (experimental) perl extension implements OnTheSpot editing. It does |
432 | not work perfectly, and some input methods don't seem to work well with |
432 | not work perfectly, and some input methods don't seem to work well with |
433 | OnTheSpot editing in general, but it seems to work at leats for \s-1SCIM\s0 and |
433 | OnTheSpot editing in general, but it seems to work at least for \s-1SCIM\s0 and |
434 | kinput2. |
434 | kinput2. |
435 | .Sp |
435 | .Sp |
436 | You enable it by specifying this extension and a preedit style of |
436 | You enable it by specifying this extension and a preedit style of |
437 | \&\f(CW\*(C`OnTheSpot\*(C'\fR, i.e.: |
437 | \&\f(CW\*(C`OnTheSpot\*(C'\fR, i.e.: |
438 | .Sp |
438 | .Sp |
… | |
… | |
447 | will show or hide itself. Another press of the accelerator key will hide |
447 | will show or hide itself. Another press of the accelerator key will hide |
448 | or show it again. |
448 | or show it again. |
449 | .Sp |
449 | .Sp |
450 | Initially, the window will not be shown when using this extension. |
450 | Initially, the window will not be shown when using this extension. |
451 | .Sp |
451 | .Sp |
452 | This is useful if you need a single terminal thats not using any desktop |
452 | This is useful if you need a single terminal that is not using any desktop |
453 | space most of the time but is quickly available at the press of a key. |
453 | space most of the time but is quickly available at the press of a key. |
454 | .Sp |
454 | .Sp |
455 | The accelerator key is grabbed regardless of any modifiers, so this |
455 | The accelerator key is grabbed regardless of any modifiers, so this |
456 | extension will actually grab a physical key just for this function. |
456 | extension will actually grab a physical key just for this function. |
457 | .Sp |
457 | .Sp |
458 | If you want a quake-like animation, tell your window manager to do so |
458 | If you want a quake-like animation, tell your window manager to do so |
459 | (fvwm can do it). |
459 | (fvwm can do it). |
460 | .IP "automove-background" 4 |
|
|
461 | .IX Item "automove-background" |
|
|
462 | This is basically a very small extension that dynamically changes the |
|
|
463 | background pixmap offset to the window position, in effect creating the |
|
|
464 | same effect as pseudo transparency with a custom pixmap. No scaling is |
|
|
465 | supported in this mode. Example: |
|
|
466 | .Sp |
|
|
467 | .Vb 1 |
|
|
468 | \& @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
|
|
469 | .Ve |
|
|
470 | .Sp |
|
|
471 | <http://wiki.archlinux.org/index.php/Perl_Background_Rotation/Extensions> |
|
|
472 | shows how this extension can be used to implement an automatically blurred |
|
|
473 | transparent background. |
|
|
474 | .IP "block-graphics-to-ascii" 4 |
460 | .IP "block-graphics-to-ascii" 4 |
475 | .IX Item "block-graphics-to-ascii" |
461 | .IX Item "block-graphics-to-ascii" |
476 | A not very useful example of filtering all text output to the terminal |
462 | A not very useful example of filtering all text output to the terminal |
477 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
463 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
478 | similar-looking ascii character. |
464 | similar-looking ascii character. |
… | |
… | |
480 | .IX Item "digital-clock" |
466 | .IX Item "digital-clock" |
481 | Displays a digital clock using the built-in overlay. |
467 | Displays a digital clock using the built-in overlay. |
482 | .IP "remote-clipboard" 4 |
468 | .IP "remote-clipboard" 4 |
483 | .IX Item "remote-clipboard" |
469 | .IX Item "remote-clipboard" |
484 | Somewhat of a misnomer, this extension adds two menu entries to the |
470 | Somewhat of a misnomer, this extension adds two menu entries to the |
485 | selection popup that allows one ti run external commands to store the |
471 | selection popup that allows one to run external commands to store the |
486 | selection somewhere and fetch it again. |
472 | selection somewhere and fetch it again. |
487 | .Sp |
473 | .Sp |
488 | We use it to implement a \*(L"distributed selection mechanism\*(R", which just |
474 | We use it to implement a \*(L"distributed selection mechanism\*(R", which just |
489 | means that one command uploads the file to a remote server, and another |
475 | means that one command uploads the file to a remote server, and another |
490 | reads it. |
476 | reads it. |
… | |
… | |
1606 | .Vb 12 |
1592 | .Vb 12 |
1607 | \& $term->{socket} = ... |
1593 | \& $term->{socket} = ... |
1608 | \& $term->{iow} = urxvt::iow |
1594 | \& $term->{iow} = urxvt::iow |
1609 | \& ->new |
1595 | \& ->new |
1610 | \& ->fd (fileno $term->{socket}) |
1596 | \& ->fd (fileno $term->{socket}) |
1611 | \& ->events (urxvt::EVENT_READ) |
1597 | \& ->events (urxvt::EV_READ) |
1612 | \& ->start |
1598 | \& ->start |
1613 | \& ->cb (sub { |
1599 | \& ->cb (sub { |
1614 | \& my ($iow, $revents) = @_; |
1600 | \& my ($iow, $revents) = @_; |
1615 | \& # $revents must be 1 here, no need to check |
1601 | \& # $revents must be 1 here, no need to check |
1616 | \& sysread $term->{socket}, my $buf, 8192 |
1602 | \& sysread $term->{socket}, my $buf, 8192 |
… | |
… | |
1631 | Set the file descriptor (not handle) to watch. |
1617 | Set the file descriptor (not handle) to watch. |
1632 | .ie n .IP "$iow = $iow\->events ($eventmask)" 4 |
1618 | .ie n .IP "$iow = $iow\->events ($eventmask)" 4 |
1633 | .el .IP "$iow = \f(CW$iow\fR\->events ($eventmask)" 4 |
1619 | .el .IP "$iow = \f(CW$iow\fR\->events ($eventmask)" 4 |
1634 | .IX Item "$iow = $iow->events ($eventmask)" |
1620 | .IX Item "$iow = $iow->events ($eventmask)" |
1635 | Set the event mask to watch. The only allowed values are |
1621 | Set the event mask to watch. The only allowed values are |
1636 | \&\f(CW\*(C`urxvt::EVENT_READ\*(C'\fR and \f(CW\*(C`urxvt::EVENT_WRITE\*(C'\fR, which might be ORed |
1622 | \&\f(CW\*(C`urxvt::EV_READ\*(C'\fR and \f(CW\*(C`urxvt::EV_WRITE\*(C'\fR, which might be ORed |
1637 | together, or \f(CW\*(C`urxvt::EVENT_NONE\*(C'\fR. |
1623 | together, or \f(CW\*(C`urxvt::EV_NONE\*(C'\fR. |
1638 | .ie n .IP "$iow = $iow\->start" 4 |
1624 | .ie n .IP "$iow = $iow\->start" 4 |
1639 | .el .IP "$iow = \f(CW$iow\fR\->start" 4 |
1625 | .el .IP "$iow = \f(CW$iow\fR\->start" 4 |
1640 | .IX Item "$iow = $iow->start" |
1626 | .IX Item "$iow = $iow->start" |
1641 | Start watching for requested events on the given handle. |
1627 | Start watching for requested events on the given handle. |
1642 | .ie n .IP "$iow = $iow\->stop" 4 |
1628 | .ie n .IP "$iow = $iow\->stop" 4 |