… | |
… | |
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: |
… | |
… | |
253 | You enable it by specifying this extension and a preedit style of |
259 | You enable it by specifying this extension and a preedit style of |
254 | C<OnTheSpot>, i.e.: |
260 | C<OnTheSpot>, i.e.: |
255 | |
261 | |
256 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
262 | @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot |
257 | |
263 | |
|
|
264 | =item kuake<hotkey> |
|
|
265 | |
|
|
266 | A very primitive quake-console-like extension. It was inspired by a |
|
|
267 | description of how the programs C<kuake> and C<yakuake> work: Whenever the |
|
|
268 | user presses a global accelerator key (by default C<F10>), the terminal |
|
|
269 | will show or hide itself. Another press of the accelerator key will hide |
|
|
270 | or show it again. |
|
|
271 | |
|
|
272 | Initially, the window will not be shown when using this extension. |
|
|
273 | |
|
|
274 | This is useful if you need a single terminal thats not using any desktop |
|
|
275 | space most of the time but is quickly available at the press of a key. |
|
|
276 | |
|
|
277 | The accelerator key is grabbed regardless of any modifers, so this |
|
|
278 | extension will actually grab a physical key just for this function. |
|
|
279 | |
|
|
280 | If you want a quake-like animation, tell your window manager to do so |
|
|
281 | (fvwm can do it). |
|
|
282 | |
258 | =item automove-background |
283 | =item automove-background |
259 | |
284 | |
260 | This is basically a one-line extension that dynamically changes the background pixmap offset |
285 | 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 |
286 | background pixmap offset to the window position, in effect creating the |
262 | a custom pixmap. No scaling is supported in this mode. Exmaple: |
287 | same effect as pseudo transparency with a custom pixmap. No scaling is |
|
|
288 | supported in this mode. Exmaple: |
263 | |
289 | |
264 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
290 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
265 | |
291 | |
266 | =item block-graphics-to-ascii |
292 | =item block-graphics-to-ascii |
267 | |
293 | |
268 | A not very useful example of filtering all text output to the terminal, |
294 | 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 |
295 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
270 | similar-looking ascii character. |
296 | similar-looking ascii character. |
271 | |
297 | |
272 | =item digital-clock |
298 | =item digital-clock |
273 | |
299 | |
… | |
… | |
368 | |
394 | |
369 | =back |
395 | =back |
370 | |
396 | |
371 | =head2 Extension Objects |
397 | =head2 Extension Objects |
372 | |
398 | |
373 | Very perl extension is a perl class. A separate perl object is created |
399 | 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 |
400 | 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 |
401 | 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 |
402 | about other extensions, with the exception of methods and members that |
377 | begin with an underscore character C<_>: these are reserved for internal |
403 | begin with an underscore character C<_>: these are reserved for internal |
378 | use. |
404 | use. |
… | |
… | |
493 | |
519 | |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
520 | 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 |
521 | $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. |
522 | number of lines that will be in the scrollback buffer. |
497 | |
523 | |
|
|
524 | =item on_osc_seq $term, $op, $args |
|
|
525 | |
|
|
526 | Called on every OSC sequence and can be used to suppress it or modify its |
|
|
527 | behaviour. The default should be to return an empty list. A true value |
|
|
528 | suppresses execution of the request completely. Make sure you don't get |
|
|
529 | confused by recursive invocations when you output an osc sequence within |
|
|
530 | this callback. |
|
|
531 | |
|
|
532 | C<on_osc_seq_perl> should be used for new behaviour. |
|
|
533 | |
498 | =item on_osc_seq $term, $string |
534 | =item on_osc_seq_perl $term, $string |
499 | |
535 | |
500 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
536 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
501 | operating system command) is processed. Cursor position and other state |
537 | operating system command) is processed. Cursor position and other state |
502 | information is up-to-date when this happens. For interoperability, the |
538 | information is up-to-date when this happens. For interoperability, the |
503 | string should start with the extension name and a colon, to distinguish |
539 | string should start with the extension name and a colon, to distinguish |
… | |
… | |
553 | resource in the @@RXVT_NAME@@(1) manpage). |
589 | resource in the @@RXVT_NAME@@(1) manpage). |
554 | |
590 | |
555 | The event is simply the action string. This interface is assumed to change |
591 | The event is simply the action string. This interface is assumed to change |
556 | slightly in the future. |
592 | slightly in the future. |
557 | |
593 | |
|
|
594 | =item on_resize_all_windows $tern, $new_width, $new_height |
|
|
595 | |
|
|
596 | Called just after the new window size has been calculcated, but before |
|
|
597 | windows are actually being resized or hints are being set. If this hook |
|
|
598 | returns TRUE, setting of the window hints is being skipped. |
|
|
599 | |
558 | =item on_x_event $term, $event |
600 | =item on_x_event $term, $event |
559 | |
601 | |
560 | Called on every X event received on the vt window (and possibly other |
602 | 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 |
603 | windows). Should only be used as a last resort. Most event structure |
562 | members are not passed. |
604 | members are not passed. |
|
|
605 | |
|
|
606 | =item on_root_event $term, $event |
|
|
607 | |
|
|
608 | Like C<on_x_event>, but is called for events on the root window. |
563 | |
609 | |
564 | =item on_focus_in $term |
610 | =item on_focus_in $term |
565 | |
611 | |
566 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
612 | Called whenever the window gets the keyboard focus, before rxvt-unicode |
567 | does focus in processing. |
613 | does focus in processing. |
… | |
… | |
891 | |
937 | |
892 | if (my $cb = $TERM->{_hook}[$htype]) { |
938 | if (my $cb = $TERM->{_hook}[$htype]) { |
893 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
939 | verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" |
894 | if $verbosity >= 10; |
940 | if $verbosity >= 10; |
895 | |
941 | |
896 | keys %$cb; |
942 | for my $pkg (keys %$cb) { |
897 | |
|
|
898 | while (my ($pkg, $cb) = each %$cb) { |
|
|
899 | my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; |
943 | my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) }; |
900 | $retval ||= $retval_; |
944 | $retval ||= $retval_; |
901 | |
945 | |
902 | if ($@) { |
946 | if ($@) { |
903 | $TERM->ungrab; # better to lose the grab than the session |
947 | $TERM->ungrab; # better to lose the grab than the session |
904 | warn $@; |
948 | warn $@; |
… | |
… | |
1468 | =item $env = $term->env |
1512 | =item $env = $term->env |
1469 | |
1513 | |
1470 | Returns a copy of the environment in effect for the terminal as a hashref |
1514 | Returns a copy of the environment in effect for the terminal as a hashref |
1471 | similar to C<\%ENV>. |
1515 | similar to C<\%ENV>. |
1472 | |
1516 | |
|
|
1517 | =item @envv = $term->envv |
|
|
1518 | |
|
|
1519 | Returns the environment as array of strings of the form C<VAR=VALUE>. |
|
|
1520 | |
|
|
1521 | =item @argv = $term->argv |
|
|
1522 | |
|
|
1523 | Return the argument vector as this terminal, similar to @ARGV, but |
|
|
1524 | includes the program name as first element. |
|
|
1525 | |
1473 | =cut |
1526 | =cut |
1474 | |
1527 | |
1475 | sub env { |
1528 | sub env { |
1476 | if (my $env = $_[0]->_env) { |
|
|
1477 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } |
1529 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv } |
1478 | } else { |
|
|
1479 | +{ %ENV } |
|
|
1480 | } |
|
|
1481 | } |
1530 | } |
1482 | |
1531 | |
1483 | =item $modifiermask = $term->ModLevel3Mask |
1532 | =item $modifiermask = $term->ModLevel3Mask |
1484 | |
1533 | |
1485 | =item $modifiermask = $term->ModMetaMask |
1534 | =item $modifiermask = $term->ModMetaMask |