--- rxvt-unicode/src/urxvt.pm 2006/12/07 03:02:44 1.150 +++ rxvt-unicode/src/urxvt.pm 2007/06/02 05:23:11 1.153 @@ -262,6 +262,7 @@ 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 +308,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 +997,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; @@ -1956,11 +1986,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 @@ -2155,3 +2180,5 @@ =cut 1 + +# vim: sw=3: