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.134 by root, Sat Feb 11 02:31:13 2006 UTC vs.
Revision 1.143 by root, Thu Jul 6 23:48:11 2006 UTC

151bottom. C<Escape> leaves search mode and returns to the point where search 151bottom. C<Escape> leaves search mode and returns to the point where search
152was started, while C<Enter> or C<Return> stay at the current position and 152was started, while C<Enter> or C<Return> stay at the current position and
153additionally stores the first match in the current line into the primary 153additionally stores the first match in the current line into the primary
154selection. 154selection.
155 155
156The regex defaults to "(?i)", resulting in a case-insensitive search. To
157get a case-sensitive search you can delete this prefix using C<BackSpace>
158or simply use an uppercase character which removes the "(?i)" prefix.
159
160See L<perlre> for more info about perl regular expression syntax.
161
156=item readline (enabled by default) 162=item readline (enabled by default)
157 163
158A support package that tries to make editing with readline easier. At the 164A support package that tries to make editing with readline easier. At
159moment, it reacts to clicking with the left mouse button by trying to 165the moment, it reacts to clicking shift-left mouse button by trying to
160move the text cursor to this position. It does so by generating as many 166move the text cursor to this position. It does so by generating as many
161cursor-left or cursor-right keypresses as required (the this only works 167cursor-left or cursor-right keypresses as required (the this only works
162for programs that correctly support wide characters). 168for programs that correctly support wide characters).
163 169
164To avoid too many false positives, this is only done when: 170To avoid too many false positives, this is only done when:
253You enable it by specifying this extension and a preedit style of 259You enable it by specifying this extension and a preedit style of
254C<OnTheSpot>, i.e.: 260C<OnTheSpot>, i.e.:
255 261
256 @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot 262 @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot
257 263
264=item kuake<hotkey>
265
266A very primitive quake-console-like extension. It was inspired by a
267description of how the programs C<kuake> and C<yakuake> work: Whenever the
268user presses a global accelerator key (by default C<F10>), the terminal
269will show or hide itself. Another press of the accelerator key will hide
270or show it again.
271
272Initially, the window will not be shown when using this extension.
273
274This is useful if you need a single terminal thats not using any desktop
275space most of the time but is quickly available at the press of a key.
276
277The accelerator key is grabbed regardless of any modifers, so this
278extension will actually grab a physical key just for this function.
279
280If you want a quake-like animation, tell your window manager to do so
281(fvwm can do it).
282
258=item automove-background 283=item automove-background
259 284
260This is basically a one-line extension that dynamically changes the background pixmap offset 285This is basically a very small extension that dynamically changes the
261to the window position, in effect creating the same effect as pseudo transparency with 286background pixmap offset to the window position, in effect creating the
262a custom pixmap. No scaling is supported in this mode. Exmaple: 287same effect as pseudo transparency with a custom pixmap. No scaling is
288supported in this mode. Exmaple:
263 289
264 @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background 290 @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background
265 291
266=item block-graphics-to-ascii 292=item block-graphics-to-ascii
267 293
268A not very useful example of filtering all text output to the terminal, 294A not very useful example of filtering all text output to the terminal
269by replacing all line-drawing characters (U+2500 .. U+259F) by a 295by replacing all line-drawing characters (U+2500 .. U+259F) by a
270similar-looking ascii character. 296similar-looking ascii character.
271 297
272=item digital-clock 298=item digital-clock
273 299
368 394
369=back 395=back
370 396
371=head2 Extension Objects 397=head2 Extension Objects
372 398
373Very perl extension is a perl class. A separate perl object is created 399Every perl extension is a perl class. A separate perl object is created
374for each terminal and each extension and passed as the first parameter to 400for each terminal and each extension and passed as the first parameter to
375hooks. So extensions can use their C<$self> object without having to think 401hooks. So extensions can use their C<$self> object without having to think
376about other extensions, with the exception of methods and members that 402about other extensions, with the exception of methods and members that
377begin with an underscore character C<_>: these are reserved for internal 403begin with an underscore character C<_>: these are reserved for internal
378use. 404use.
493 519
494It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, 520It is called before lines are scrolled out (so rows 0 .. min ($lines - 1,
495$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total 521$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total
496number of lines that will be in the scrollback buffer. 522number of lines that will be in the scrollback buffer.
497 523
524=item on_osc_seq $term, $op, $args
525
526Called on every OSC sequence and can be used to suppress it or modify its
527behaviour. The default should be to return an empty list. A true value
528suppresses execution of the request completely. Make sure you don't get
529confused by recursive invocations when you output an osc sequence within
530this callback.
531
532C<on_osc_seq_perl> should be used for new behaviour.
533
498=item on_osc_seq $term, $string 534=item on_osc_seq_perl $term, $string
499 535
500Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = 536Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC =
501operating system command) is processed. Cursor position and other state 537operating system command) is processed. Cursor position and other state
502information is up-to-date when this happens. For interoperability, the 538information is up-to-date when this happens. For interoperability, the
503string should start with the extension name and a colon, to distinguish 539string should start with the extension name and a colon, to distinguish
564=item on_x_event $term, $event 600=item on_x_event $term, $event
565 601
566Called on every X event received on the vt window (and possibly other 602Called on every X event received on the vt window (and possibly other
567windows). Should only be used as a last resort. Most event structure 603windows). Should only be used as a last resort. Most event structure
568members are not passed. 604members are not passed.
605
606=item on_root_event $term, $event
607
608Like C<on_x_event>, but is called for events on the root window.
569 609
570=item on_focus_in $term 610=item on_focus_in $term
571 611
572Called whenever the window gets the keyboard focus, before rxvt-unicode 612Called whenever the window gets the keyboard focus, before rxvt-unicode
573does focus in processing. 613does focus in processing.
897 937
898 if (my $cb = $TERM->{_hook}[$htype]) { 938 if (my $cb = $TERM->{_hook}[$htype]) {
899 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" 939 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")"
900 if $verbosity >= 10; 940 if $verbosity >= 10;
901 941
902 keys %$cb; 942 for my $pkg (keys %$cb) {
903
904 while (my ($pkg, $cb) = each %$cb) {
905 my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; 943 my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) };
906 $retval ||= $retval_; 944 $retval ||= $retval_;
907 945
908 if ($@) { 946 if ($@) {
909 $TERM->ungrab; # better to lose the grab than the session 947 $TERM->ungrab; # better to lose the grab than the session
910 warn $@; 948 warn $@;
1474=item $env = $term->env 1512=item $env = $term->env
1475 1513
1476Returns a copy of the environment in effect for the terminal as a hashref 1514Returns a copy of the environment in effect for the terminal as a hashref
1477similar to C<\%ENV>. 1515similar to C<\%ENV>.
1478 1516
1517=item @envv = $term->envv
1518
1519Returns the environment as array of strings of the form C<VAR=VALUE>.
1520
1521=item @argv = $term->argv
1522
1523Return the argument vector as this terminal, similar to @ARGV, but
1524includes the program name as first element.
1525
1479=cut 1526=cut
1480 1527
1481sub env { 1528sub env {
1482 if (my $env = $_[0]->_env) {
1483 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } 1529 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv }
1484 } else {
1485 +{ %ENV }
1486 }
1487} 1530}
1488 1531
1489=item $modifiermask = $term->ModLevel3Mask 1532=item $modifiermask = $term->ModLevel3Mask
1490 1533
1491=item $modifiermask = $term->ModMetaMask 1534=item $modifiermask = $term->ModMetaMask

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines