… | |
… | |
303 | extension will actually grab a physical key just for this function. |
303 | extension will actually grab a physical key just for this function. |
304 | |
304 | |
305 | If you want a quake-like animation, tell your window manager to do so |
305 | If you want a quake-like animation, tell your window manager to do so |
306 | (fvwm can do it). |
306 | (fvwm can do it). |
307 | |
307 | |
|
|
308 | =item overlay-osc |
|
|
309 | |
|
|
310 | This extension implements some OSC commands to display timed popups on the |
|
|
311 | screen - useful for status displays from within scripts. You have to read |
|
|
312 | the sources for more info. |
|
|
313 | |
308 | =item block-graphics-to-ascii |
314 | =item block-graphics-to-ascii |
309 | |
315 | |
310 | A not very useful example of filtering all text output to the terminal |
316 | A not very useful example of filtering all text output to the terminal |
311 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
317 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
312 | similar-looking ascii character. |
318 | similar-looking ascii character. |
… | |
… | |
541 | |
547 | |
542 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
548 | It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, |
543 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
549 | $nrow - 1) represent the lines to be scrolled out). C<$saved> is the total |
544 | number of lines that will be in the scrollback buffer. |
550 | number of lines that will be in the scrollback buffer. |
545 | |
551 | |
546 | =item on_osc_seq $term, $op, $args |
552 | =item on_osc_seq $term, $op, $args, $resp |
547 | |
553 | |
548 | Called on every OSC sequence and can be used to suppress it or modify its |
554 | Called on every OSC sequence and can be used to suppress it or modify its |
549 | behaviour. The default should be to return an empty list. A true value |
555 | behaviour. The default should be to return an empty list. A true value |
550 | suppresses execution of the request completely. Make sure you don't get |
556 | suppresses execution of the request completely. Make sure you don't get |
551 | confused by recursive invocations when you output an osc sequence within |
557 | confused by recursive invocations when you output an OSC sequence within |
552 | this callback. |
558 | this callback. |
553 | |
559 | |
554 | C<on_osc_seq_perl> should be used for new behaviour. |
560 | C<on_osc_seq_perl> should be used for new behaviour. |
555 | |
561 | |
556 | =item on_osc_seq_perl $term, $string |
562 | =item on_osc_seq_perl $term, $args, $resp |
557 | |
563 | |
558 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
564 | Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = |
559 | operating system command) is processed. Cursor position and other state |
565 | operating system command) is processed. Cursor position and other state |
560 | information is up-to-date when this happens. For interoperability, the |
566 | information is up-to-date when this happens. For interoperability, the |
561 | string should start with the extension name and a colon, to distinguish |
567 | string should start with the extension name (sans -osc) and a semicolon, |
562 | it from commands for other extensions, and this might be enforced in the |
568 | to distinguish it from commands for other extensions, and this might be |
563 | future. |
569 | enforced in the future. |
|
|
570 | |
|
|
571 | For example, C<overlay-osc> uses this: |
|
|
572 | |
|
|
573 | sub on_osc_seq_perl { |
|
|
574 | my ($self, $osc, $resp) = @_; |
|
|
575 | |
|
|
576 | return unless $osc =~ s/^overlay;//; |
|
|
577 | |
|
|
578 | ... process remaining $osc string |
|
|
579 | } |
564 | |
580 | |
565 | Be careful not ever to trust (in a security sense) the data you receive, |
581 | Be careful not ever to trust (in a security sense) the data you receive, |
566 | as its source can not easily be controlled (e-mail content, messages from |
582 | as its source can not easily be controlled (e-mail content, messages from |
567 | other users on the same system etc.). |
583 | other users on the same system etc.). |
|
|
584 | |
|
|
585 | For responses, C<$resp> contains the end-of-args separator used by the |
|
|
586 | sender. |
568 | |
587 | |
569 | =item on_add_lines $term, $string |
588 | =item on_add_lines $term, $string |
570 | |
589 | |
571 | Called whenever text is about to be output, with the text as argument. You |
590 | Called whenever text is about to be output, with the text as argument. You |
572 | can filter/change and output the text yourself by returning a true value |
591 | can filter/change and output the text yourself by returning a true value |
… | |
… | |
593 | later with the already-modified line (e.g. if unrelated parts change), so |
612 | later with the already-modified line (e.g. if unrelated parts change), so |
594 | you cannot just toggle rendition bits, but only set them. |
613 | you cannot just toggle rendition bits, but only set them. |
595 | |
614 | |
596 | =item on_refresh_begin $term |
615 | =item on_refresh_begin $term |
597 | |
616 | |
598 | Called just before the screen gets redrawn. Can be used for overlay |
617 | Called just before the screen gets redrawn. Can be used for overlay or |
599 | or similar effects by modify terminal contents in refresh_begin, and |
618 | similar effects by modifying the terminal contents in refresh_begin, and |
600 | restoring them in refresh_end. The built-in overlay and selection display |
619 | restoring them in refresh_end. The built-in overlay and selection display |
601 | code is run after this hook, and takes precedence. |
620 | code is run after this hook, and takes precedence. |
602 | |
621 | |
603 | =item on_refresh_end $term |
622 | =item on_refresh_end $term |
604 | |
623 | |
… | |
… | |
1373 | |
1392 | |
1374 | The methods currently supported on C<urxvt::overlay> objects are: |
1393 | The methods currently supported on C<urxvt::overlay> objects are: |
1375 | |
1394 | |
1376 | =over 4 |
1395 | =over 4 |
1377 | |
1396 | |
1378 | =item $overlay->set ($x, $y, $text, $rend) |
1397 | =item $overlay->set ($x, $y, $text[, $rend]) |
1379 | |
1398 | |
1380 | Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts |
1399 | Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts |
1381 | text in rxvt-unicode's special encoding and an array of rendition values |
1400 | text in rxvt-unicode's special encoding and an array of rendition values |
1382 | at a specific position inside the overlay. |
1401 | at a specific position inside the overlay. |
|
|
1402 | |
|
|
1403 | If C<$rend> is missing, then the rendition will not be changed. |
1383 | |
1404 | |
1384 | =item $overlay->hide |
1405 | =item $overlay->hide |
1385 | |
1406 | |
1386 | If visible, hide the overlay, but do not destroy it. |
1407 | If visible, hide the overlay, but do not destroy it. |
1387 | |
1408 | |