… | |
… | |
153 | additionally stores the first match in the current line into the primary |
153 | additionally stores the first match in the current line into the primary |
154 | selection. |
154 | selection. |
155 | |
155 | |
156 | =item readline (enabled by default) |
156 | =item readline (enabled by default) |
157 | |
157 | |
158 | A support package that tries to make editing with readline easier. At the |
158 | A support package that tries to make editing with readline easier. At |
159 | moment, it reacts to clicking with the left mouse button by trying to |
159 | the moment, it reacts to clicking shift-left mouse button by trying to |
160 | move the text cursor to this position. It does so by generating as many |
160 | move the text cursor to this position. It does so by generating as many |
161 | cursor-left or cursor-right keypresses as required (the this only works |
161 | cursor-left or cursor-right keypresses as required (the this only works |
162 | for programs that correctly support wide characters). |
162 | for programs that correctly support wide characters). |
163 | |
163 | |
164 | To avoid too many false positives, this is only done when: |
164 | To avoid too many false positives, this is only done when: |
… | |
… | |
255 | |
255 | |
256 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
256 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
257 | |
257 | |
258 | =item automove-background |
258 | =item automove-background |
259 | |
259 | |
260 | This is basically a one-line extension that dynamically changes the background pixmap offset |
260 | This is basically a very small extension that dynamically changes the |
261 | to the window position, in effect creating the same effect as pseudo transparency with |
261 | background pixmap offset to the window position, in effect creating the |
262 | a custom pixmap. No scaling is supported in this mode. Exmaple: |
262 | same effect as pseudo transparency with a custom pixmap. No scaling is |
|
|
263 | supported in this mode. Exmaple: |
263 | |
264 | |
264 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
265 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
265 | |
266 | |
266 | =item block-graphics-to-ascii |
267 | =item block-graphics-to-ascii |
267 | |
268 | |
… | |
… | |
368 | |
369 | |
369 | =back |
370 | =back |
370 | |
371 | |
371 | =head2 Extension Objects |
372 | =head2 Extension Objects |
372 | |
373 | |
373 | Very perl extension is a perl class. A separate perl object is created |
374 | Every perl extension is a perl class. A separate perl object is created |
374 | for each terminal and each extension and passed as the first parameter to |
375 | for each terminal and each extension and passed as the first parameter to |
375 | hooks. So extensions can use their C<$self> object without having to think |
376 | hooks. So extensions can use their C<$self> object without having to think |
376 | about other extensions, with the exception of methods and members that |
377 | about other extensions, with the exception of methods and members that |
377 | begin with an underscore character C<_>: these are reserved for internal |
378 | begin with an underscore character C<_>: these are reserved for internal |
378 | use. |
379 | use. |
… | |
… | |
493 | |
494 | |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
495 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
495 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
496 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
496 | number of lines that will be in the scrollback buffer. |
497 | number of lines that will be in the scrollback buffer. |
497 | |
498 | |
|
|
499 | =item on_osc_seq $term, $op, $args |
|
|
500 | |
|
|
501 | Called on every OSC sequence and can be used to suppress it or modify its |
|
|
502 | behaviour. The default should be to return an empty list. A true value |
|
|
503 | suppresses execution of the request completely. Make sure you don't get |
|
|
504 | confused by recursive invocations when you output an osc sequence within |
|
|
505 | this callback. |
|
|
506 | |
|
|
507 | C<on_osc_seq_perl> should be used for new behaviour. |
|
|
508 | |
498 | =item on_osc_seq $term, $string |
509 | =item on_osc_seq_perl $term, $string |
499 | |
510 | |
500 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
511 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
501 | operating system command) is processed. Cursor position and other state |
512 | operating system command) is processed. Cursor position and other state |
502 | information is up-to-date when this happens. For interoperability, the |
513 | information is up-to-date when this happens. For interoperability, the |
503 | string should start with the extension name and a colon, to distinguish |
514 | string should start with the extension name and a colon, to distinguish |
… | |
… | |
552 | a C<perl:string> action bound to a key, see description of the B<keysym> |
563 | a C<perl:string> action bound to a key, see description of the B<keysym> |
553 | resource in the @@RXVT_NAME@@(1) manpage). |
564 | resource in the @@RXVT_NAME@@(1) manpage). |
554 | |
565 | |
555 | The event is simply the action string. This interface is assumed to change |
566 | The event is simply the action string. This interface is assumed to change |
556 | slightly in the future. |
567 | slightly in the future. |
|
|
568 | |
|
|
569 | =item on_resize_all_windows $tern, $new_width, $new_height |
|
|
570 | |
|
|
571 | Called just after the new window size has been calculcated, but before |
|
|
572 | windows are actually being resized or hints are being set. If this hook |
|
|
573 | returns TRUE, setting of the window hints is being skipped. |
557 | |
574 | |
558 | =item on_x_event $term, $event |
575 | =item on_x_event $term, $event |
559 | |
576 | |
560 | Called on every X event received on the vt window (and possibly other |
577 | Called on every X event received on the vt window (and possibly other |
561 | windows). Should only be used as a last resort. Most event structure |
578 | windows). Should only be used as a last resort. Most event structure |
… | |
… | |
891 | |
908 | |
892 | if (my $cb = $TERM->{_hook}[$htype]) { |
909 | if (my $cb = $TERM->{_hook}[$htype]) { |
893 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
910 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
894 | if $verbosity >= 10; |
911 | if $verbosity >= 10; |
895 | |
912 | |
896 | keys %$cb; |
913 | for my $pkg (keys %$cb) { |
897 | |
|
|
898 | while (my ($pkg, $cb) = each %$cb) { |
|
|
899 | my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; |
914 | my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) }; |
900 | $retval ||= $retval_; |
915 | $retval ||= $retval_; |
901 | |
916 | |
902 | if ($@) { |
917 | if ($@) { |
903 | $TERM->ungrab; # better to lose the grab than the session |
918 | $TERM->ungrab; # better to lose the grab than the session |
904 | warn $@; |
919 | warn $@; |
… | |
… | |
1468 | =item $env = $term->env |
1483 | =item $env = $term->env |
1469 | |
1484 | |
1470 | Returns a copy of the environment in effect for the terminal as a hashref |
1485 | Returns a copy of the environment in effect for the terminal as a hashref |
1471 | similar to C<\%ENV>. |
1486 | similar to C<\%ENV>. |
1472 | |
1487 | |
|
|
1488 | =item @envv = $term->envv |
|
|
1489 | |
|
|
1490 | Returns the environment as array of strings of the form C<VAR=VALUE>. |
|
|
1491 | |
|
|
1492 | =item @argv = $term->argv |
|
|
1493 | |
|
|
1494 | Return the argument vector as this terminal, similar to @ARGV, but |
|
|
1495 | includes the program name as first element. |
|
|
1496 | |
1473 | =cut |
1497 | =cut |
1474 | |
1498 | |
1475 | sub env { |
1499 | sub env { |
1476 | if (my $env = $_[0]->_env) { |
|
|
1477 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } |
1500 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv } |
1478 | } else { |
|
|
1479 | +{ %ENV } |
|
|
1480 | } |
|
|
1481 | } |
1501 | } |
1482 | |
1502 | |
1483 | =item $modifiermask = $term->ModLevel3Mask |
1503 | =item $modifiermask = $term->ModLevel3Mask |
1484 | |
1504 | |
1485 | =item $modifiermask = $term->ModMetaMask |
1505 | =item $modifiermask = $term->ModMetaMask |