… | |
… | |
260 | |
260 | |
261 | Example configuration: |
261 | Example configuration: |
262 | |
262 | |
263 | URxvt.perl-ext: default,matcher |
263 | URxvt.perl-ext: default,matcher |
264 | URxvt.urlLauncher: sensible-browser |
264 | URxvt.urlLauncher: sensible-browser |
|
|
265 | URxvt.keysym.C-Delete: perl:matcher |
265 | URxvt.matcher.button: 1 |
266 | URxvt.matcher.button: 1 |
266 | URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] |
267 | URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] |
267 | URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) |
268 | URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) |
268 | URxvt.matcher.launcher.2: gvim +$2 $1 |
269 | URxvt.matcher.launcher.2: gvim +$2 $1 |
269 | |
270 | |
… | |
… | |
304 | background pixmap offset to the window position, in effect creating the |
305 | background pixmap offset to the window position, in effect creating the |
305 | same effect as pseudo transparency with a custom pixmap. No scaling is |
306 | same effect as pseudo transparency with a custom pixmap. No scaling is |
306 | supported in this mode. Example: |
307 | supported in this mode. Example: |
307 | |
308 | |
308 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
309 | @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background |
|
|
310 | |
|
|
311 | L<http://wiki.archlinux.org/index.php/Perl_Background_Rotation/Extensions> |
|
|
312 | shows how this extension can be used to implement an automatically blurred |
|
|
313 | transparent background. |
309 | |
314 | |
310 | =item block-graphics-to-ascii |
315 | =item block-graphics-to-ascii |
311 | |
316 | |
312 | A not very useful example of filtering all text output to the terminal |
317 | A not very useful example of filtering all text output to the terminal |
313 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
318 | by replacing all line-drawing characters (U+2500 .. U+259F) by a |
… | |
… | |
988 | $retval |
993 | $retval |
989 | } |
994 | } |
990 | |
995 | |
991 | sub SET_COLOR($$$) { |
996 | sub SET_COLOR($$$) { |
992 | SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2]) |
997 | SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2]) |
|
|
998 | } |
|
|
999 | |
|
|
1000 | sub rend2mask { |
|
|
1001 | no strict 'refs'; |
|
|
1002 | my ($str, $mask) = (@_, 0); |
|
|
1003 | my %color = ( fg => undef, bg => undef ); |
|
|
1004 | my @failed; |
|
|
1005 | for my $spec ( split /\s+/, $str ) { |
|
|
1006 | if ( $spec =~ /^([fb]g)[_:-]?(\d+)/i ) { |
|
|
1007 | $color{lc($1)} = $2; |
|
|
1008 | } else { |
|
|
1009 | my $neg = $spec =~ s/^[-^]//; |
|
|
1010 | unless ( exists &{"RS_$spec"} ) { |
|
|
1011 | push @failed, $spec; |
|
|
1012 | next; |
|
|
1013 | } |
|
|
1014 | my $cur = &{"RS_$spec"}; |
|
|
1015 | if ( $neg ) { |
|
|
1016 | $mask &= ~$cur; |
|
|
1017 | } else { |
|
|
1018 | $mask |= $cur; |
|
|
1019 | } |
|
|
1020 | } |
|
|
1021 | } |
|
|
1022 | ($mask, @color{qw(fg bg)}, \@failed) |
993 | } |
1023 | } |
994 | |
1024 | |
995 | # urxvt::term::extension |
1025 | # urxvt::term::extension |
996 | |
1026 | |
997 | package urxvt::term::extension; |
1027 | package urxvt::term::extension; |
… | |
… | |
2148 | http://software.schmorp.de/pkg/rxvt-unicode |
2178 | http://software.schmorp.de/pkg/rxvt-unicode |
2149 | |
2179 | |
2150 | =cut |
2180 | =cut |
2151 | |
2181 | |
2152 | 1 |
2182 | 1 |
|
|
2183 | |
|
|
2184 | # vim: sw=3: |