… | |
… | |
85 | Displays a digital clock using the built-in overlay. |
85 | Displays a digital clock using the built-in overlay. |
86 | |
86 | |
87 | =item mark-urls |
87 | =item mark-urls |
88 | |
88 | |
89 | Uses per-line display filtering (C<on_line_update>) to underline urls and |
89 | Uses per-line display filtering (C<on_line_update>) to underline urls and |
90 | make them clickable. When clicked, the program specified in the resource |
90 | make them clickable. When middle-clicked, the program specified in the |
91 | C<urlLauncher> (default C<x-www-browser>) will be started. |
91 | resource C<urlLauncher> (default C<x-www-browser>) will be started. |
92 | |
92 | |
93 | =item block-graphics-to-ascii |
93 | =item block-graphics-to-ascii |
94 | |
94 | |
95 | A not very useful example of filtering all text output to the terminal, |
95 | A not very useful example of filtering all text output to the terminal, |
96 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
96 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
… | |
… | |
496 | $msg .= "\n" |
496 | $msg .= "\n" |
497 | unless $msg =~ /\n$/; |
497 | unless $msg =~ /\n$/; |
498 | urxvt::warn ($msg); |
498 | urxvt::warn ($msg); |
499 | }; |
499 | }; |
500 | |
500 | |
|
|
501 | # %ENV is the original startup environment |
501 | delete $ENV{IFS}; |
502 | delete $ENV{IFS}; |
502 | delete $ENV{CDPATH}; |
503 | delete $ENV{CDPATH}; |
503 | delete $ENV{BASH_ENV}; |
504 | delete $ENV{BASH_ENV}; |
504 | $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin"; |
505 | $ENV{PATH} = "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/opt/sbin"; |
505 | } |
506 | } |
… | |
… | |
612 | # clear package |
613 | # clear package |
613 | %$TERM = (); |
614 | %$TERM = (); |
614 | } |
615 | } |
615 | |
616 | |
616 | $retval |
617 | $retval |
|
|
618 | } |
|
|
619 | |
|
|
620 | sub exec_async(@) { |
|
|
621 | my $pid = fork; |
|
|
622 | |
|
|
623 | return |
|
|
624 | if !defined $pid or $pid; |
|
|
625 | |
|
|
626 | %ENV = %{ $TERM->env }; |
|
|
627 | |
|
|
628 | exec @_; |
|
|
629 | _exit 255; |
617 | } |
630 | } |
618 | |
631 | |
619 | # urxvt::term::extension |
632 | # urxvt::term::extension |
620 | |
633 | |
621 | package urxvt::term::extension; |
634 | package urxvt::term::extension; |