--- rxvt-unicode/src/urxvt.pm 2006/10/03 21:41:07 1.148 +++ rxvt-unicode/src/urxvt.pm 2007/08/01 17:55:37 1.156 @@ -28,6 +28,9 @@ Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where scripts will be shared (but not enabled) for all terminals. +You can disable the embedded perl interpreter by setting both "perl-ext" +and "perl-ext-common" resources to the empty string. + =head1 PREPACKAGED EXTENSIONS This section describes the extensions delivered with this release. You can @@ -151,7 +154,7 @@ bottom. C leaves search mode and returns to the point where search was started, while C or C stay at the current position and additionally stores the first match in the current line into the primary -selection. +selection if the C modifier is active. The regex defaults to "(?i)", resulting in a case-insensitive search. To get a case-sensitive search you can delete this prefix using C @@ -258,10 +261,14 @@ with numbered patterns, in a manner similar to the "selection" extension. The launcher can also be overridden on a per-pattern basis. +It is possible to activate the most recently seen match from the keyboard. +Simply bind a keysym to "perl:matcher" as seen in the example below. + Example configuration: URxvt.perl-ext: default,matcher URxvt.urlLauncher: sensible-browser + URxvt.keysym.C-Delete: perl:matcher URxvt.matcher.button: 1 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) @@ -307,6 +314,10 @@ @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background +L +shows how this extension can be used to implement an automatically blurred +transparent background. + =item block-graphics-to-ascii A not very useful example of filtering all text output to the terminal @@ -992,6 +1003,31 @@ SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2]) } +sub rend2mask { + no strict 'refs'; + my ($str, $mask) = (@_, 0); + my %color = ( fg => undef, bg => undef ); + my @failed; + for my $spec ( split /\s+/, $str ) { + if ( $spec =~ /^([fb]g)[_:-]?(\d+)/i ) { + $color{lc($1)} = $2; + } else { + my $neg = $spec =~ s/^[-^]//; + unless ( exists &{"RS_$spec"} ) { + push @failed, $spec; + next; + } + my $cur = &{"RS_$spec"}; + if ( $neg ) { + $mask &= ~$cur; + } else { + $mask |= $cur; + } + } + } + ($mask, @color{qw(fg bg)}, \@failed) +} + # urxvt::term::extension package urxvt::term::extension; @@ -1112,19 +1148,23 @@ } sub condvar { - bless \my $flag, urxvt::anyevent::condvar:: + bless \my $flag, urxvt::anyevent:: } -sub urxvt::anyevent::condvar::broadcast { +sub broadcast { ${$_[0]}++; } -sub urxvt::anyevent::condvar::wait { +sub wait { unless (${$_[0]}) { Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; } } +sub one_event { + Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API"; +} + package urxvt::term; =head2 The C Class @@ -1952,11 +1992,6 @@ package urxvt::watcher; -@urxvt::timer::ISA = __PACKAGE__; -@urxvt::iow::ISA = __PACKAGE__; -@urxvt::pw::ISA = __PACKAGE__; -@urxvt::iw::ISA = __PACKAGE__; - =head2 The C Class This class implements timer watchers/events. Time is represented as a @@ -2151,3 +2186,5 @@ =cut 1 + +# vim: sw=3: