… | |
… | |
66 | =item selection-popup (enabled by default) |
66 | =item selection-popup (enabled by default) |
67 | |
67 | |
68 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
68 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
69 | text into various other formats/action. |
69 | text into various other formats/action. |
70 | |
70 | |
71 | =item searchable-scrollback (enabled by default) |
71 | =item searchable-scrollback<hotkey> (enabled by default) |
72 | |
72 | |
73 | Adds regex search functionality to the scrollback buffer, triggered by a |
73 | Adds regex search functionality to the scrollback buffer, triggered |
74 | hotkey (default: C<M-s>). When in search mode, terminal input/output is |
74 | by a hotkey (default: C<M-s>). When in search mode, normal terminal |
|
|
75 | input/output is suspended. |
|
|
76 | |
75 | suspended, C</> starts an incremental regex search, C<n> searches further, |
77 | C</> starts an incremental regex search, C<n> searches further, C<p> or |
76 | C<p> jumps to the previous match. C<enter> leaves search mode at the |
78 | C<N> jump to the previous match, C<G> jumps to the bottom and clears the |
77 | current position and C<escape> returns to the original position. |
79 | history, C<enter> leaves search mode at the current position and C<escape> |
|
|
80 | returns to the original position. |
78 | |
81 | |
79 | =item digital-clock |
82 | =item digital-clock |
80 | |
83 | |
81 | Displays a digital clock using the built-in overlay. |
84 | Displays a digital clock using the built-in overlay. |
82 | |
85 | |
… | |
… | |
263 | can filter/change and output the text yourself by returning a true value |
266 | can filter/change and output the text yourself by returning a true value |
264 | and calling C<< $term->scr_add_lines >> yourself. Please note that this |
267 | and calling C<< $term->scr_add_lines >> yourself. Please note that this |
265 | might be very slow, however, as your hook is called for B<all> text being |
268 | might be very slow, however, as your hook is called for B<all> text being |
266 | output. |
269 | output. |
267 | |
270 | |
|
|
271 | =item on_tt_write $term, $octets |
|
|
272 | |
|
|
273 | Called whenever some data is written to the tty/pty and can be used to |
|
|
274 | suppress or filter tty input. |
|
|
275 | |
268 | =item on_line_update $term, $row |
276 | =item on_line_update $term, $row |
269 | |
277 | |
270 | Called whenever a line was updated or changed. Can be used to filter |
278 | Called whenever a line was updated or changed. Can be used to filter |
271 | screen output (e.g. underline urls or other useless stuff). Only lines |
279 | screen output (e.g. underline urls or other useless stuff). Only lines |
272 | that are being shown will be filtered, and, due to performance reasons, |
280 | that are being shown will be filtered, and, due to performance reasons, |
… | |
… | |
457 | our $VERSION = 1; |
465 | our $VERSION = 1; |
458 | our $TERM; |
466 | our $TERM; |
459 | our @HOOKNAME; |
467 | our @HOOKNAME; |
460 | our %HOOKTYPE = map +($HOOKNAME[$_] => $_), 0..$#HOOKNAME; |
468 | our %HOOKTYPE = map +($HOOKNAME[$_] => $_), 0..$#HOOKNAME; |
461 | our %OPTION; |
469 | our %OPTION; |
|
|
470 | |
462 | our $LIBDIR; |
471 | our $LIBDIR; |
|
|
472 | our $RESNAME; |
|
|
473 | our $RESCLASS; |
|
|
474 | our $RXVTNAME; |
463 | |
475 | |
464 | BEGIN { |
476 | BEGIN { |
465 | urxvt->bootstrap; |
477 | urxvt->bootstrap; |
466 | |
478 | |
467 | # overwrite perl's warn |
479 | # overwrite perl's warn |
… | |
… | |
501 | open my $fh, "<:raw", $path |
513 | open my $fh, "<:raw", $path |
502 | or die "$path: $!"; |
514 | or die "$path: $!"; |
503 | |
515 | |
504 | my $source = untaint |
516 | my $source = untaint |
505 | "package $pkg; use strict; use utf8;\n" |
517 | "package $pkg; use strict; use utf8;\n" |
506 | . "use base urxvt::term::proxy::;\n" |
518 | . "use base urxvt::term::extension::;\n" |
507 | . "#line 1 \"$path\"\n{\n" |
519 | . "#line 1 \"$path\"\n{\n" |
508 | . (do { local $/; <$fh> }) |
520 | . (do { local $/; <$fh> }) |
509 | . "\n};\n1"; |
521 | . "\n};\n1"; |
510 | |
522 | |
511 | eval $source |
523 | eval $source |
… | |
… | |
588 | } |
600 | } |
589 | |
601 | |
590 | $retval |
602 | $retval |
591 | } |
603 | } |
592 | |
604 | |
593 | # urxvt::term::proxy |
605 | # urxvt::term::extension |
594 | |
606 | |
595 | package urxvt::term::proxy; |
607 | package urxvt::term::extension; |
596 | |
608 | |
597 | sub enable { |
609 | sub enable { |
598 | my ($self, %hook) = @_; |
610 | my ($self, %hook) = @_; |
599 | my $pkg = $self->{_pkg}; |
611 | my $pkg = $self->{_pkg}; |
600 | |
612 | |