ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.147 by root, Tue Oct 3 11:32:20 2006 UTC vs.
Revision 1.153 by root, Sat Jun 2 05:23:11 2007 UTC

260 260
261Example configuration: 261Example 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
270=item xim-onthespot 271=item xim-onthespot
271 272
304background pixmap offset to the window position, in effect creating the 305background pixmap offset to the window position, in effect creating the
305same effect as pseudo transparency with a custom pixmap. No scaling is 306same effect as pseudo transparency with a custom pixmap. No scaling is
306supported in this mode. Example: 307supported 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
311L<http://wiki.archlinux.org/index.php/Perl_Background_Rotation/Extensions>
312shows how this extension can be used to implement an automatically blurred
313transparent background.
309 314
310=item block-graphics-to-ascii 315=item block-graphics-to-ascii
311 316
312A not very useful example of filtering all text output to the terminal 317A not very useful example of filtering all text output to the terminal
313by replacing all line-drawing characters (U+2500 .. U+259F) by a 318by replacing all line-drawing characters (U+2500 .. U+259F) by a
990 995
991sub SET_COLOR($$$) { 996sub SET_COLOR($$$) {
992 SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2]) 997 SET_BGCOLOR (SET_FGCOLOR ($_[0], $_[1]), $_[2])
993} 998}
994 999
1000sub 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)
1023}
1024
995# urxvt::term::extension 1025# urxvt::term::extension
996 1026
997package urxvt::term::extension; 1027package urxvt::term::extension;
998 1028
999sub enable { 1029sub enable {
1110sub DESTROY { 1140sub DESTROY {
1111 $_[0][1]->stop; 1141 $_[0][1]->stop;
1112} 1142}
1113 1143
1114sub condvar { 1144sub condvar {
1115 bless \my $flag, urxvt::anyevent::condvar:: 1145 bless \my $flag, urxvt::anyevent::
1116} 1146}
1117 1147
1118sub urxvt::anyevent::condvar::broadcast { 1148sub broadcast {
1119 ${$_[0]}++; 1149 ${$_[0]}++;
1120} 1150}
1121 1151
1122sub urxvt::anyevent::condvar::wait { 1152sub wait {
1123 unless (${$_[0]}) { 1153 unless (${$_[0]}) {
1124 Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API"; 1154 Carp::croak "AnyEvent->condvar blocking wait unsupported in urxvt, use a non-blocking API";
1125 } 1155 }
1156}
1157
1158sub one_event {
1159 Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API";
1126} 1160}
1127 1161
1128package urxvt::term; 1162package urxvt::term;
1129 1163
1130=head2 The C<urxvt::term> Class 1164=head2 The C<urxvt::term> Class
1950 1984
1951=cut 1985=cut
1952 1986
1953package urxvt::watcher; 1987package urxvt::watcher;
1954 1988
1955@urxvt::timer::ISA = __PACKAGE__;
1956@urxvt::iow::ISA = __PACKAGE__;
1957@urxvt::pw::ISA = __PACKAGE__;
1958@urxvt::iw::ISA = __PACKAGE__;
1959
1960=head2 The C<urxvt::timer> Class 1989=head2 The C<urxvt::timer> Class
1961 1990
1962This class implements timer watchers/events. Time is represented as a 1991This class implements timer watchers/events. Time is represented as a
1963fractional number of seconds since the epoch. Example: 1992fractional number of seconds since the epoch. Example:
1964 1993
2149 http://software.schmorp.de/pkg/rxvt-unicode 2178 http://software.schmorp.de/pkg/rxvt-unicode
2150 2179
2151=cut 2180=cut
2152 2181
21531 21821
2183
2184# vim: sw=3:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines