--- rxvt-unicode/src/urxvt.pm 2007/06/02 06:43:02 1.154 +++ rxvt-unicode/src/urxvt.pm 2007/12/24 08:21:40 1.164 @@ -42,7 +42,7 @@ Or by adding them to the resource for extensions loaded by default: - URxvt.perl-ext-common: default,automove-background,selection-autotransform + URxvt.perl-ext-common: default,selection-autotransform =over 4 @@ -103,7 +103,7 @@ onto C<@{ $term->{option_popup_hook} }>, which gets called whenever the popup is being displayed. -It's sole argument is the popup menu, which can be modified. It should +Its sole argument is the popup menu, which can be modified. It should either return nothing or a string, the initial boolean value and a code reference. The string will be used as button text and the code reference will be called when the toggle changes, with the new boolean value as @@ -126,7 +126,7 @@ onto C<@{ $term->{selection_popup_hook} }>, which gets called whenever the popup is being displayed. -It's sole argument is the popup menu, which can be modified. The selection +Its sole argument is the popup menu, which can be modified. The selection is in C<$_>, which can be used to decide whether to add something or not. It should either return nothing or a string and a code reference. The string will be used as button text and the code reference will be called @@ -137,7 +137,7 @@ Cs: push @{ $self->{term}{selection_popup_hook} }, sub { - /a/ ? ("a to be" => sub { s/a/b/g } + /a/ ? ("a to b" => sub { s/a/b/g } : () }; @@ -154,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 @@ -167,7 +167,7 @@ A support package that tries to make editing with readline easier. At the moment, it reacts to clicking shift-left mouse button by trying to move the text cursor to this position. It does so by generating as many -cursor-left or cursor-right keypresses as required (the this only works +cursor-left or cursor-right keypresses as required (this only works for programs that correctly support wide characters). To avoid too many false positives, this is only done when: @@ -261,6 +261,9 @@ 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 @@ -275,7 +278,7 @@ This (experimental) perl extension implements OnTheSpot editing. It does not work perfectly, and some input methods don't seem to work well with -OnTheSpot editing in general, but it seems to work at leats for SCIM and +OnTheSpot editing in general, but it seems to work at least for SCIM and kinput2. You enable it by specifying this extension and a preedit style of @@ -293,7 +296,7 @@ Initially, the window will not be shown when using this extension. -This is useful if you need a single terminal thats not using any desktop +This is useful if you need a single terminal that is not using any desktop space most of the time but is quickly available at the press of a key. The accelerator key is grabbed regardless of any modifiers, so this @@ -302,19 +305,6 @@ If you want a quake-like animation, tell your window manager to do so (fvwm can do it). -=item automove-background - -This is basically a very small extension that dynamically changes the -background pixmap offset to the window position, in effect creating the -same effect as pseudo transparency with a custom pixmap. No scaling is -supported in this mode. Example: - - @@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 @@ -328,7 +318,7 @@ =item remote-clipboard Somewhat of a misnomer, this extension adds two menu entries to the -selection popup that allows one ti run external commands to store the +selection popup that allows one to run external commands to store the selection somewhere and fetch it again. We use it to implement a "distributed selection mechanism", which just @@ -927,7 +917,7 @@ if ($htype == 0) { # INIT my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); - + my %ext_arg; { @@ -1297,7 +1287,7 @@ preeditType print_pipe pty_fd reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer scrollstyle - secondaryScreen secondaryScroll selectstyle shade term_name title + secondaryScreen secondaryScroll shade term_name title transient_for transparent transparent_all tripleclickwords utmpInhibit visualBell @@ -1637,7 +1627,7 @@ C<$text> is in a special encoding: tabs and wide characters that use more than one cell when displayed are padded with C<$urxvt::NOCHAR> (chr 65535) characters. Characters with combining characters and other characters that -do not fit into the normal tetx encoding will be replaced with characters +do not fit into the normal text encoding will be replaced with characters in the private use area. You have to obey this encoding when changing text. The advantage is @@ -1966,14 +1956,21 @@ delete $env->{LC_ALL}; $env->{LC_CTYPE} = $self->{term}->locale; - urxvt::term->new ($env, "popup", - "--perl-lib" => "", "--perl-ext-common" => "", - "-pty-fd" => -1, "-sl" => 0, - "-b" => 1, "-bd" => "grey80", "-bl", "-override-redirect", - "--transient-for" => $self->{term}->parent, - "-display" => $self->{term}->display_id, - "-pe" => "urxvt-popup") - or die "unable to create popup window\n"; + my $term = urxvt::term->new ( + $env, "popup", + "--perl-lib" => "", "--perl-ext-common" => "", + "-pty-fd" => -1, "-sl" => 0, + "-b" => 1, "-bd" => "grey80", "-bl", "-override-redirect", + "--transient-for" => $self->{term}->parent, + "-display" => $self->{term}->display_id, + "-pe" => "urxvt-popup", + ) or die "unable to create popup window\n"; + + unless (delete $term->{urxvt_popup_init_done}) { + $term->ungrab; + $term->destroy; + die "unable to initialise popup window\n"; + } } sub DESTROY { @@ -2001,7 +1998,7 @@ ->cb (sub { $term->{overlay}->set (0, 0, sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); - }); + }); =over 4 @@ -2054,7 +2051,7 @@ $term->{iow} = urxvt::iow ->new ->fd (fileno $term->{socket}) - ->events (urxvt::EVENT_READ) + ->events (urxvt::EV_READ) ->start ->cb (sub { my ($iow, $revents) = @_; @@ -2082,8 +2079,8 @@ =item $iow = $iow->events ($eventmask) Set the event mask to watch. The only allowed values are -C and C, which might be ORed -together, or C. +C and C, which might be ORed +together, or C. =item $iow = $iow->start @@ -2134,7 +2131,7 @@ ->cb (sub { my ($pw, $exit_status) = @_; ... - }); + }); =over 4