… | |
… | |
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: |
… | |
… | |
493 | |
493 | |
494 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
494 | 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 |
495 | $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. |
496 | number of lines that will be in the scrollback buffer. |
497 | |
497 | |
|
|
498 | =item on_osc_seq $term, $op, $args |
|
|
499 | |
|
|
500 | Called on every OSC sequence and can be used to suppress it or modify its |
|
|
501 | behaviour. The default should be to return an empty list. A true value |
|
|
502 | suppresses execution of the request completely. Make sure you don't get |
|
|
503 | confused by recursive invocations when you output an osc sequence within |
|
|
504 | this callback. |
|
|
505 | |
|
|
506 | C<on_osc_seq_perl> should be used for new behaviour. |
|
|
507 | |
498 | =item on_osc_seq $term, $string |
508 | =item on_osc_seq_perl $term, $string |
499 | |
509 | |
500 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
510 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
501 | operating system command) is processed. Cursor position and other state |
511 | operating system command) is processed. Cursor position and other state |
502 | information is up-to-date when this happens. For interoperability, the |
512 | information is up-to-date when this happens. For interoperability, the |
503 | string should start with the extension name and a colon, to distinguish |
513 | 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> |
562 | a C<perl:string> action bound to a key, see description of the B<keysym> |
553 | resource in the @@RXVT_NAME@@(1) manpage). |
563 | resource in the @@RXVT_NAME@@(1) manpage). |
554 | |
564 | |
555 | The event is simply the action string. This interface is assumed to change |
565 | The event is simply the action string. This interface is assumed to change |
556 | slightly in the future. |
566 | slightly in the future. |
|
|
567 | |
|
|
568 | =item on_resize_all_windows $tern, $new_width, $new_height |
|
|
569 | |
|
|
570 | Called just after the new window size has been calculcated, but before |
|
|
571 | windows are actually being resized or hints are being set. If this hook |
|
|
572 | returns TRUE, setting of the window hints is being skipped. |
557 | |
573 | |
558 | =item on_x_event $term, $event |
574 | =item on_x_event $term, $event |
559 | |
575 | |
560 | Called on every X event received on the vt window (and possibly other |
576 | 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 |
577 | windows). Should only be used as a last resort. Most event structure |
… | |
… | |
1468 | =item $env = $term->env |
1484 | =item $env = $term->env |
1469 | |
1485 | |
1470 | Returns a copy of the environment in effect for the terminal as a hashref |
1486 | Returns a copy of the environment in effect for the terminal as a hashref |
1471 | similar to C<\%ENV>. |
1487 | similar to C<\%ENV>. |
1472 | |
1488 | |
|
|
1489 | =item @envv = $term->envv |
|
|
1490 | |
|
|
1491 | Returns the environment as array of strings of the form C<VAR=VALUE>. |
|
|
1492 | |
|
|
1493 | =item @argv = $term->argv |
|
|
1494 | |
|
|
1495 | Return the argument vector as this terminal, similar to @ARGV, but |
|
|
1496 | includes the program name as first element. |
|
|
1497 | |
1473 | =cut |
1498 | =cut |
1474 | |
1499 | |
1475 | sub env { |
1500 | sub env { |
1476 | if (my $env = $_[0]->_env) { |
|
|
1477 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } |
1501 | +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv } |
1478 | } else { |
|
|
1479 | +{ %ENV } |
|
|
1480 | } |
|
|
1481 | } |
1502 | } |
1482 | |
1503 | |
1483 | =item $modifiermask = $term->ModLevel3Mask |
1504 | =item $modifiermask = $term->ModLevel3Mask |
1484 | |
1505 | |
1485 | =item $modifiermask = $term->ModMetaMask |
1506 | =item $modifiermask = $term->ModMetaMask |