… | |
… | |
151 | bottom. C<Escape> leaves search mode and returns to the point where search |
151 | bottom. C<Escape> leaves search mode and returns to the point where search |
152 | was started, while C<Enter> or C<Return> stay at the current position and |
152 | was started, while C<Enter> or C<Return> stay at the current position and |
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 | The regex defaults to "(?i)", resulting in a case-insensitive search. To |
|
|
157 | get a case-sensitive search you can delete this prefix using C<BackSpace> |
|
|
158 | or simply use an uppercase character which removes the "(?i)" prefix. |
|
|
159 | |
|
|
160 | See L<perlre> for more info about perl regular expression syntax. |
|
|
161 | |
156 | =item readline (enabled by default) |
162 | =item readline (enabled by default) |
157 | |
163 | |
158 | A support package that tries to make editing with readline easier. At the |
164 | 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 |
165 | 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 |
166 | 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 |
167 | cursor-left or cursor-right keypresses as required (the this only works |
162 | for programs that correctly support wide characters). |
168 | for programs that correctly support wide characters). |
163 | |
169 | |
164 | To avoid too many false positives, this is only done when: |
170 | To avoid too many false positives, this is only done when: |
… | |
… | |
255 | |
261 | |
256 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
262 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
257 | |
263 | |
258 | =item automove-background |
264 | =item automove-background |
259 | |
265 | |
260 | This is basically a one-line extension that dynamically changes the background pixmap offset |
266 | 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 |
267 | background pixmap offset to the window position, in effect creating the |
262 | a custom pixmap. No scaling is supported in this mode. Exmaple: |
268 | same effect as pseudo transparency with a custom pixmap. No scaling is |
|
|
269 | supported in this mode. Exmaple: |
263 | |
270 | |
264 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
271 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
265 | |
272 | |
266 | =item block-graphics-to-ascii |
273 | =item block-graphics-to-ascii |
267 | |
274 | |
268 | A not very useful example of filtering all text output to the terminal, |
275 | A not very useful example of filtering all text output to the terminal |
269 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
276 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
270 | similar-looking ascii character. |
277 | similar-looking ascii character. |
271 | |
278 | |
272 | =item digital-clock |
279 | =item digital-clock |
273 | |
280 | |
… | |
… | |
368 | |
375 | |
369 | =back |
376 | =back |
370 | |
377 | |
371 | =head2 Extension Objects |
378 | =head2 Extension Objects |
372 | |
379 | |
373 | Very perl extension is a perl class. A separate perl object is created |
380 | 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 |
381 | 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 |
382 | 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 |
383 | about other extensions, with the exception of methods and members that |
377 | begin with an underscore character C<_>: these are reserved for internal |
384 | begin with an underscore character C<_>: these are reserved for internal |
378 | use. |
385 | use. |
… | |
… | |
493 | |
500 | |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
501 | 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 |
502 | $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. |
503 | number of lines that will be in the scrollback buffer. |
497 | |
504 | |
|
|
505 | =item on_osc_seq $term, $op, $args |
|
|
506 | |
|
|
507 | Called on every OSC sequence and can be used to suppress it or modify its |
|
|
508 | behaviour. The default should be to return an empty list. A true value |
|
|
509 | suppresses execution of the request completely. Make sure you don't get |
|
|
510 | confused by recursive invocations when you output an osc sequence within |
|
|
511 | this callback. |
|
|
512 | |
|
|
513 | C<on_osc_seq_perl> should be used for new behaviour. |
|
|
514 | |
498 | =item on_osc_seq $term, $string |
515 | =item on_osc_seq_perl $term, $string |
499 | |
516 | |
500 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
517 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
501 | operating system command) is processed. Cursor position and other state |
518 | operating system command) is processed. Cursor position and other state |
502 | information is up-to-date when this happens. For interoperability, the |
519 | information is up-to-date when this happens. For interoperability, the |
503 | string should start with the extension name and a colon, to distinguish |
520 | string should start with the extension name and a colon, to distinguish |
… | |
… | |
897 | |
914 | |
898 | if (my $cb = $TERM->{_hook}[$htype]) { |
915 | if (my $cb = $TERM->{_hook}[$htype]) { |
899 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
916 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
900 | if $verbosity >= 10; |
917 | if $verbosity >= 10; |
901 | |
918 | |
902 | keys %$cb; |
919 | for my $pkg (keys %$cb) { |
903 | |
|
|
904 | while (my ($pkg, $cb) = each %$cb) { |
|
|
905 | my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; |
920 | my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) }; |
906 | $retval ||= $retval_; |
921 | $retval ||= $retval_; |
907 | |
922 | |
908 | if ($@) { |
923 | if ($@) { |
909 | $TERM->ungrab; # better to lose the grab than the session |
924 | $TERM->ungrab; # better to lose the grab than the session |
910 | warn $@; |
925 | warn $@; |
… | |
… | |
1474 | =item $env = $term->env |
1489 | =item $env = $term->env |
1475 | |
1490 | |
1476 | Returns a copy of the environment in effect for the terminal as a hashref |
1491 | Returns a copy of the environment in effect for the terminal as a hashref |
1477 | similar to C<\%ENV>. |
1492 | similar to C<\%ENV>. |
1478 | |
1493 | |
|
|
1494 | =item @envv = $term->envv |
|
|
1495 | |
|
|
1496 | Returns the environment as array of strings of the form C<VAR=VALUE>. |
|
|
1497 | |
|
|
1498 | =item @argv = $term->argv |
|
|
1499 | |
|
|
1500 | Return the argument vector as this terminal, similar to @ARGV, but |
|
|
1501 | includes the program name as first element. |
|
|
1502 | |
1479 | =cut |
1503 | =cut |
1480 | |
1504 | |
1481 | sub env { |
1505 | sub env { |
1482 | if (my $env = $_[0]->_env) { |
|
|
1483 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } |
1506 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv } |
1484 | } else { |
|
|
1485 | +{ %ENV } |
|
|
1486 | } |
|
|
1487 | } |
1507 | } |
1488 | |
1508 | |
1489 | =item $modifiermask = $term->ModLevel3Mask |
1509 | =item $modifiermask = $term->ModLevel3Mask |
1490 | |
1510 | |
1491 | =item $modifiermask = $term->ModMetaMask |
1511 | =item $modifiermask = $term->ModMetaMask |