URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007</pre>
</dd>
<dd>
+<p>If <em>string</em> takes the form <code>perl:STRING</code>, then the specified <strong>STRING</strong>
+is passed to the <code>on_keyboard_command</code> perl handler. See the <code>rxvtperl(3)</code>
+manpage. For example, the <em>selection</em> extension (activated via
+<code>rxvt -pe selection</code>) listens for <code>selection:rot13</code> events:</p>
+</dd>
+<dd>
+<pre>
+ URxvt.keysym.M-C-c: perl:selection:rot13</pre>
+</dd>
+<dd>
<p>Due the the large number of modifier combinations, a defined key mapping
will match if at <em>at least</em> the specified identifiers are being set, and
no other key mappings with those and more bits are being defined. That
Colon-separated list of additional directories that hold extension
scripts. When looking for extensions specified by the <code>perl</code> resource,
rxvt will first look in these directories and then in
-<em>/opt/rxvt/lib/urxvt/perl-ext/</em>.
+<em>/opt/rxvt/lib/urxvt/perl/</em>.
</dd>
<dd>
<p>See the <code>rxvtperl(3)</code> manpage.</p>
\& URxvt.keysym.M-C-c: command:\e033]701;zh_CN.GBK\e007
.Ve
.Sp
+If \fIstring\fR takes the form \f(CW\*(C`perl:STRING\*(C'\fR, then the specified \fB\s-1STRING\s0\fR
+is passed to the \f(CW\*(C`on_keyboard_command\*(C'\fR perl handler. See the @@RXVT_NAME@@\fIperl\fR\|(3)
+manpage. For example, the \fIselection\fR extension (activated via
+\&\f(CW\*(C`@@RXVT_NAME@@ \-pe selection\*(C'\fR) listens for \f(CW\*(C`selection:rot13\*(C'\fR events:
+.Sp
+.Vb 1
+\& URxvt.keysym.M-C-c: perl:selection:rot13
+.Ve
+.Sp
Due the the large number of modifier combinations, a defined key mapping
will match if at \fIat least\fR the specified identifiers are being set, and
no other key mappings with those and more bits are being defined. That
.IP "\fBperl-eval\fR: \fIstring\fR" 4
.IX Item "perl-eval: string"
Perl code to be evaluated when all extensions have been registered. See the
-\&\fIrxvtperl\fR\|(3) manpage.
+@@RXVT_NAME@@\fIperl\fR\|(3) manpage.
.IP "\fBperl-lib\fR: \fIpath\fR" 4
.IX Item "perl-lib: path"
Colon-separated list of additional directories that hold extension
scripts. When looking for extensions specified by the \f(CW\*(C`perl\*(C'\fR resource,
@@RXVT_NAME@@ will first look in these directories and then in
-\&\fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR.
+\&\fI@@RXVT_LIBDIR@@/urxvt/perl/\fR.
.Sp
-See the \fIrxvtperl\fR\|(3) manpage.
+See the @@RXVT_NAME@@\fIperl\fR\|(3) manpage.
.SH "THE SCROLLBAR"
.IX Header "THE SCROLLBAR"
Lines of text that scroll off the top of the \fB@@RXVT_NAME@@\fR window
URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007
If I<string> takes the form C<perl:STRING>, then the specified B<STRING>
-is passed to the C<on_keyboard_command> perl handler. See the rxvtperl(3)
+is passed to the C<on_keyboard_command> perl handler. See the @@RXVT_NAME@@perl(3)
manpage. For example, the F<selection> extension (activated via
C<@@RXVT_NAME@@ -pe selection>) listens for C<selection:rot13> events:
=item B<perl-eval>: I<string>
Perl code to be evaluated when all extensions have been registered. See the
-rxvtperl(3) manpage.
+@@RXVT_NAME@@perl(3) manpage.
=item B<perl-lib>: I<path>
@@RXVT_NAME@@ will first look in these directories and then in
F<@@RXVT_LIBDIR@@/urxvt/perl/>.
-See the rxvtperl(3) manpage.
+See the @@RXVT_NAME@@perl(3) manpage.
=back
URxvt.keysym.M-C-c: command:\033]701;zh_CN.GBK\007
+ If *string* takes the form "perl:STRING", then the specified STRING
+ is passed to the "on_keyboard_command" perl handler. See the
+ rxvtperl(3) manpage. For example, the selection extension (activated
+ via "rxvt -pe selection") listens for "selection:rot13" events:
+
+ URxvt.keysym.M-C-c: perl:selection:rot13
+
Due the the large number of modifier combinations, a defined key
mapping will match if at *at least* the specified identifiers are
being set, and no other key mappings with those and more bits are
Colon-separated list of additional directories that hold extension
scripts. When looking for extensions specified by the "perl"
resource, rxvt will first look in these directories and then in
- /opt/rxvt/lib/urxvt/perl-ext/.
+ /opt/rxvt/lib/urxvt/perl/.
See the rxvtperl(3) manpage.
<dt><strong><a name="item_perl">--enable-perl (default: off)</a></strong><br />
</dt>
<dd>
-Enable an embedded perl interpreter. See the <strong>rxvtperl(3)</strong> manpage
-(<em>doc/rxvtperl.txt</em>) for more info on this feature, or the files in
-<em>src/perl-ext/</em> for the extensions that are installed by default.
+Enable an embedded perl interpreter. See the <strong>rxvtperl(3)</strong>
+manpage (<em>doc/rxvtperl.txt</em>) for more info on this feature, or the files
+in <em>src/perl-ext/</em> for the extensions that are installed by default.
</dd>
<p></p>
<dt><strong>--with-name=NAME (default: urxvt)</strong><br />
Add support to have the pointer disappear when typing or inactive.
.IP "\-\-enable\-perl (default: off)" 4
.IX Item "--enable-perl (default: off)"
-Enable an embedded perl interpreter. See the \fB\f(BIrxvtperl\fB\|(3)\fR manpage
-(\fIdoc/rxvtperl.txt\fR) for more info on this feature, or the files in
-\&\fIsrc/perl\-ext/\fR for the extensions that are installed by default.
+Enable an embedded perl interpreter. See the \fB@@RXVT_NAME@@\f(BIperl\fB\|(3)\fR
+manpage (\fIdoc/rxvtperl.txt\fR) for more info on this feature, or the files
+in \fIsrc/perl\-ext/\fR for the extensions that are installed by default.
.IP "\-\-with\-name=NAME (default: urxvt)" 4
.IX Item "--with-name=NAME (default: urxvt)"
Set the basename for the installed binaries, resulting
=item --enable-perl (default: off)
-Enable an embedded perl interpreter. See the B<rxvtperl(3)> manpage
-(F<doc/rxvtperl.txt>) for more info on this feature, or the files in
-F<src/perl-ext/> for the extensions that are installed by default.
+Enable an embedded perl interpreter. See the B<@@RXVT_NAME@@perl(3)>
+manpage (F<doc/rxvtperl.txt>) for more info on this feature, or the files
+in F<src/perl-ext/> for the extensions that are installed by default.
=item --with-name=NAME (default: urxvt)
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
-<p>* Put your scripts into <em>/opt/rxvt/lib/urxvt/perl-ext/</em>, they will be loaded automatically.</p>
-<p>* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and
-thus must be encoded as UTF-8.</p>
+<pre>
+ # create a file grab_test in $HOME:</pre>
<pre>
sub on_sel_grab {
warn "you selected ", $_[0]->selection;
()
}</pre>
<pre>
- 1</pre>
+ # start a rxvt using it:</pre>
+<pre>
+ rxvt --perl-lib $HOME -pe grab_test</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Everytime a terminal object gets created, scripts specified via the
-<code>perl</code> resource are associated with it.</p>
+<code>perl</code> resource are loaded and associated with it.</p>
+<p>Scripts are compiled in a 'use strict' and 'use utf8' environment, and
+thus must be encoded as UTF-8.</p>
<p>Each script will only ever be loaded once, even in rxvtd, where
scripts will be shared (But not enabled) for all terminals.</p>
<p>
<dd>
Called just after the screen gets redrawn. See <code>on_refresh_begin</code>.
</dd>
+<p></p>
+<dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br />
+</dt>
+<dd>
+Called whenever the user presses a key combination that has a
+<code>perl:string</code> action bound to it (see description of the <strong>keysym</strong>
+resource in the <code>rxvt(1)</code> manpage).
+</dd>
<p></p></dl>
<p>
</p>
.IX Title "rxvt 3"
.TH rxvt 3 "2006-01-02" "6.2" "RXVT-UNICODE"
.SH "NAME"
-rxvtperl \- rxvt\-unicode's embedded perl interpreter
+@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
-* Put your scripts into \fI@@RXVT_LIBDIR@@/urxvt/perl\-ext/\fR, they will be loaded automatically.
-.PP
-* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and
-thus must be encoded as \s-1UTF\-8\s0.
+.Vb 1
+\& # create a file grab_test in $HOME:
+.Ve
.PP
.Vb 4
\& sub on_sel_grab {
.Ve
.PP
.Vb 1
-\& 1
+\& # start a @@RXVT_NAME@@ using it:
+.Ve
+.PP
+.Vb 1
+\& @@RXVT_NAME@@ --perl-lib $HOME -pe grab_test
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
Everytime a terminal object gets created, scripts specified via the
-\&\f(CW\*(C`perl\*(C'\fR resource are associated with it.
+\&\f(CW\*(C`perl\*(C'\fR resource are loaded and associated with it.
+.PP
+Scripts are compiled in a 'use strict' and 'use utf8' environment, and
+thus must be encoded as \s-1UTF\-8\s0.
.PP
Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where
scripts will be shared (But not enabled) for all terminals.
.el .IP "on_refresh_end \f(CW$term\fR" 4
.IX Item "on_refresh_end $term"
Called just after the screen gets redrawn. See \f(CW\*(C`on_refresh_begin\*(C'\fR.
+.ie n .IP "on_keyboard_command $term\fR, \f(CW$string" 4
+.el .IP "on_keyboard_command \f(CW$term\fR, \f(CW$string\fR" 4
+.IX Item "on_keyboard_command $term, $string"
+Called whenever the user presses a key combination that has a
+\&\f(CW\*(C`perl:string\*(C'\fR action bound to it (see description of the \fBkeysym\fR
+resource in the @@RXVT_NAME@@(1) manpage).
.ie n .Sh "Functions in the ""urxvt"" Package"
.el .Sh "Functions in the \f(CWurxvt\fP Package"
.IX Subsection "Functions in the urxvt Package"
rxvtperl - rxvt-unicode's embedded perl interpreter
SYNOPSIS
- * Put your scripts into /opt/rxvt/lib/urxvt/perl-ext/, they will be
- loaded automatically.
-
- * Scripts are evaluated in a 'use strict' and 'use utf8' environment,
- and thus must be encoded as UTF-8.
+ # create a file grab_test in $HOME:
sub on_sel_grab {
warn "you selected ", $_[0]->selection;
()
}
- 1
+ # start a rxvt using it:
+
+ rxvt --perl-lib $HOME -pe grab_test
DESCRIPTION
Everytime a terminal object gets created, scripts specified via the
- "perl" resource are associated with it.
+ "perl" resource are loaded and associated with it.
+
+ Scripts are compiled in a 'use strict' and 'use utf8' environment, and
+ thus must be encoded as UTF-8.
Each script will only ever be loaded once, even in rxvtd, where scripts
will be shared (But not enabled) for all terminals.
on_refresh_end $term
Called just after the screen gets redrawn. See "on_refresh_begin".
+ on_keyboard_command $term, $string
+ Called whenever the user presses a key combination that has a
+ "perl:string" action bound to it (see description of the keysym
+ resource in the rxvt(1) manpage).
+
Functions in the "urxvt" Package
urxvt::fatal $errormessage
Fatally aborts execution with the given error message. Avoid at all
=head1 NAME
-rxvtperl - rxvt-unicode's embedded perl interpreter
+@@RXVT_NAME@@perl - rxvt-unicode's embedded perl interpreter
=head1 SYNOPSIS
Called just after the screen gets redrawn. See C<on_refresh_begin>.
+=item on_keyboard_command $term, $string
+
+Called whenever the user presses a key combination that has a
+C<perl:string> action bound to it (see description of the B<keysym>
+resource in the @@RXVT_NAME@@(1) manpage).
+
=back
=head2 Functions in the C<urxvt> Package