ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/rxvtperl.3.html
(Generate patch)

Comparing rxvt-unicode/doc/rxvtperl.3.html (file contents):
Revision 1.29 by root, Fri Jan 13 12:40:46 2006 UTC vs.
Revision 1.31 by root, Tue Jan 17 16:22:41 2006 UTC

1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml"> 2<html xmlns="http://www.w3.org/1999/xhtml">
3<head> 3<head>
4<title>urxvtperl - rxvt-unicode's embedded perl interpreter</title> 4<title>rxvtperl - rxvt-unicode's embedded perl interpreter</title>
5<link rev="made" href="mailto:perl-binary@plan9.de" /> 5<link rev="made" href="mailto:perl-binary@plan9.de" />
6</head> 6</head>
7 7
8<body style="background-color: white"> 8<body style="background-color: white">
9 9
45<hr /> 45<hr />
46<p> 46<p>
47</p> 47</p>
48<hr /> 48<hr />
49<h1><a name="name">NAME</a></h1> 49<h1><a name="name">NAME</a></h1>
50<p>urxvtperl - rxvt-unicode's embedded perl interpreter</p> 50<p>rxvtperl - rxvt-unicode's embedded perl interpreter</p>
51<p> 51<p>
52</p> 52</p>
53<hr /> 53<hr />
54<h1><a name="synopsis">SYNOPSIS</a></h1> 54<h1><a name="synopsis">SYNOPSIS</a></h1>
55<pre> 55<pre>
58 sub on_sel_grab { 58 sub on_sel_grab {
59 warn &quot;you selected &quot;, $_[0]-&gt;selection; 59 warn &quot;you selected &quot;, $_[0]-&gt;selection;
60 () 60 ()
61 }</pre> 61 }</pre>
62<pre> 62<pre>
63 # start a urxvt using it:</pre> 63 # start a rxvt using it:</pre>
64<pre> 64<pre>
65 urxvt --perl-lib $HOME -pe grab_test</pre> 65 rxvt --perl-lib $HOME -pe grab_test</pre>
66<p> 66<p>
67</p> 67</p>
68<hr /> 68<hr />
69<h1><a name="description">DESCRIPTION</a></h1> 69<h1><a name="description">DESCRIPTION</a></h1>
70<p>Everytime a terminal object gets created, extension scripts specified via 70<p>Everytime a terminal object gets created, extension scripts specified via
71the <code>perl</code> resource are loaded and associated with it.</p> 71the <code>perl</code> resource are loaded and associated with it.</p>
72<p>Scripts are compiled in a 'use strict' and 'use utf8' environment, and 72<p>Scripts are compiled in a 'use strict' and 'use utf8' environment, and
73thus must be encoded as UTF-8.</p> 73thus must be encoded as UTF-8.</p>
74<p>Each script will only ever be loaded once, even in urxvtd, where 74<p>Each script will only ever be loaded once, even in rxvtd, where
75scripts will be shared (but not enabled) for all terminals.</p> 75scripts will be shared (but not enabled) for all terminals.</p>
76<p> 76<p>
77</p> 77</p>
78<hr /> 78<hr />
79<h1><a name="prepackaged_extensions">PREPACKAGED EXTENSIONS</a></h1> 79<h1><a name="prepackaged_extensions">PREPACKAGED EXTENSIONS</a></h1>
80<p>This section describes the extensions delivered with this release. You can 80<p>This section describes the extensions delivered with this release. You can
81find them in <em>/usr/local/lib/urxvt/perl/</em>.</p> 81find them in <em>/opt/rxvt/lib/urxvt/perl/</em>.</p>
82<p>You can activate them like this:</p> 82<p>You can activate them like this:</p>
83<pre> 83<pre>
84 urxvt -pe &lt;extensionname&gt;</pre> 84 rxvt -pe &lt;extensionname&gt;</pre>
85<dl> 85<dl>
86<dt><strong><a name="item_selection">selection (enabled by default)</a></strong><br /> 86<dt><strong><a name="item_selection">selection (enabled by default)</a></strong><br />
87</dt> 87</dt>
88<dd> 88<dd>
89(More) intelligent selection. This extension tries to be more intelligent 89(More) intelligent selection. This extension tries to be more intelligent
120<dd> 120<dd>
121<p>You can look at the source of the selection extension to see more 121<p>You can look at the source of the selection extension to see more
122interesting uses, such as parsing a line from beginning to end.</p> 122interesting uses, such as parsing a line from beginning to end.</p>
123</dd> 123</dd>
124<dd> 124<dd>
125<p>This extension also offers the following bindable keyboard command:</p> 125<p>This extension also offers following bindable keyboard commands:</p>
126</dd> 126</dd>
127<dl> 127<dl>
128<dt><strong><a name="item_rot13">rot13</a></strong><br /> 128<dt><strong><a name="item_rot13">rot13</a></strong><br />
129</dt> 129</dt>
130<dd> 130<dd>
131Rot-13 the selection when activated. Used via keyboard trigger: 131Rot-13 the selection when activated. Used via keyboard trigger:
132</dd> 132</dd>
133<dd> 133<dd>
134<pre> 134<pre>
135 URxvt.keysym.C-M-r: perl:selection:rot13</pre> 135 URxvt.keysym.C-M-r: perl:selection:rot13</pre>
136</dd>
137<p></p>
138<dt><strong><a name="item_remote_2dpastebin">remote-pastebin</a></strong><br />
139</dt>
140<dd>
141Upload the selection as textfile to a remote site.
142</dd>
143<dd>
144<pre>
145 URxvt.keysym.C-M-e: perl:selection:remote-pastebin</pre>
146</dd>
147<dd>
148<p>To set the command to upload the file set this resource:</p>
149</dd>
150<dd>
151<pre>
152 URxvt.selection-pastebin-cmd: rsync -apP % ruth:/var/www/www.ta-sa.org/files/txt/.</pre>
153</dd>
154<dd>
155<p>The % is the placeholder for the textfile. The name of the textfile is the hex encoded
156md5 sum of the selection.
157After an successful upload the selection will be replaced by the following url
158(the % is the placeholder for the filename):</p>
159</dd>
160<dd>
161<pre>
162 URxvt.selection-pastebin-url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre>
136</dd> 163</dd>
137<p></p></dl> 164<p></p></dl>
138<dt><strong><a name="item_popup">option-popup (enabled by default)</a></strong><br /> 165<dt><strong><a name="item_popup">option-popup (enabled by default)</a></strong><br />
139</dt> 166</dt>
140<dd> 167<dd>
489<dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br /> 516<dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br />
490</dt> 517</dt>
491<dd> 518<dd>
492Called whenever the user presses a key combination that has a 519Called whenever the user presses a key combination that has a
493<code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> 520<code>perl:string</code> action bound to it (see description of the <strong>keysym</strong>
494resource in the <code>urxvt(1)</code> manpage). 521resource in the <code>rxvt(1)</code> manpage).
495</dd> 522</dd>
496<p></p> 523<p></p>
497<dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> 524<dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br />
498</dt> 525</dt>
499<dd> 526<dd>
600<p>Using this function has the advantage that its output ends up in the 627<p>Using this function has the advantage that its output ends up in the
601correct place, e.g. on stderr of the connecting urxvtc client.</p> 628correct place, e.g. on stderr of the connecting urxvtc client.</p>
602</dd> 629</dd>
603<dd> 630<dd>
604<p>Messages have a size limit of 1023 bytes currently.</p> 631<p>Messages have a size limit of 1023 bytes currently.</p>
605</dd>
606<p></p>
607<dt><strong><a name="item__24is_safe__3d_urxvt_3a_3asafe">$is_safe = urxvt::safe</a></strong><br />
608</dt>
609<dd>
610Returns true when it is safe to do potentially unsafe things, such as
611evaluating perl code specified by the user. This is true when urxvt was
612started setuid or setgid.
613</dd> 632</dd>
614<p></p> 633<p></p>
615<dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br /> 634<dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br />
616</dt> 635</dt>
617<dd> 636<dd>
735<p></p> 754<p></p>
736<dt><strong><a name="item_destroy">$term-&gt;destroy</a></strong><br /> 755<dt><strong><a name="item_destroy">$term-&gt;destroy</a></strong><br />
737</dt> 756</dt>
738<dd> 757<dd>
739Destroy the terminal object (close the window, free resources 758Destroy the terminal object (close the window, free resources
740etc.). Please note that urxvt will not exit as long as any event 759etc.). Please note that rxvt will not exit as long as any event
741watchers (timers, io watchers) are still active. 760watchers (timers, io watchers) are still active.
742</dd> 761</dd>
743<p></p> 762<p></p>
744<dt><strong><a name="item_option">$isset = $term-&gt;option ($optval[, $set])</a></strong><br /> 763<dt><strong><a name="item_option">$isset = $term-&gt;option ($optval[, $set])</a></strong><br />
745</dt> 764</dt>
820<p></p> 839<p></p>
821<dt><strong><a name="item_parse_keysym">$success = $term-&gt;parse_keysym ($keysym_spec, $command_string)</a></strong><br /> 840<dt><strong><a name="item_parse_keysym">$success = $term-&gt;parse_keysym ($keysym_spec, $command_string)</a></strong><br />
822</dt> 841</dt>
823<dd> 842<dd>
824Adds a keymap translation exactly as specified via a resource. See the 843Adds a keymap translation exactly as specified via a resource. See the
825<code>keysym</code> resource in the <code>urxvt(1)</code> manpage. 844<code>keysym</code> resource in the <code>rxvt(1)</code> manpage.
826</dd> 845</dd>
827<p></p> 846<p></p>
828<dt><strong><a name="item_rstyle">$rend = $term-&gt;rstyle ([$new_rstyle])</a></strong><br /> 847<dt><strong><a name="item_rstyle">$rend = $term-&gt;rstyle ([$new_rstyle])</a></strong><br />
829</dt> 848</dt>
830<dd> 849<dd>
1054</dt> 1073</dt>
1055<dt><strong><a name="item_savelines">$max_scrollback = $term-&gt;saveLines</a></strong><br /> 1074<dt><strong><a name="item_savelines">$max_scrollback = $term-&gt;saveLines</a></strong><br />
1056</dt> 1075</dt>
1057<dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term-&gt;total_rows</a></strong><br /> 1076<dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term-&gt;total_rows</a></strong><br />
1058</dt> 1077</dt>
1059<dt><strong><a name="item_nsaved">$lines_in_scrollback = $term-&gt;nsaved</a></strong><br /> 1078<dt><strong><a name="item_top_row">$topmost_scrollback_row = $term-&gt;top_row</a></strong><br />
1060</dt> 1079</dt>
1061<dd> 1080<dd>
1062Return various integers describing terminal characteristics. 1081Return various integers describing terminal characteristics.
1063</dd> 1082</dd>
1064<p></p> 1083<p></p>
1093</dd> 1112</dd>
1094<p></p> 1113<p></p>
1095<dt><strong><a name="item_view_start">$view_start = $term-&gt;view_start ([$newvalue])</a></strong><br /> 1114<dt><strong><a name="item_view_start">$view_start = $term-&gt;view_start ([$newvalue])</a></strong><br />
1096</dt> 1115</dt>
1097<dd> 1116<dd>
1098Returns the negative row number of the topmost line. Minimum value is 1117Returns the row number of the topmost displayed line. Maximum value is
1099<code>0</code>, which displays the normal terminal contents. Larger values scroll 1118<code>0</code>, which displays the normal terminal contents. Lower values scroll
1100this many lines into the scrollback buffer. 1119this many lines into the scrollback buffer.
1101</dd> 1120</dd>
1102<p></p> 1121<p></p>
1103<dt><strong><a name="item_want_refresh">$term-&gt;want_refresh</a></strong><br /> 1122<dt><strong><a name="item_want_refresh">$term-&gt;want_refresh</a></strong><br />
1104</dt> 1123</dt>
1115</dt> 1134</dt>
1116<dd> 1135<dd>
1117Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> 1136Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code>
1118is the topmost terminal line, row <code>$term-&gt;$ncol-1</code> is the bottommost 1137is the topmost terminal line, row <code>$term-&gt;$ncol-1</code> is the bottommost
1119terminal line. The scrollback buffer starts at line <code>-1</code> and extends to 1138terminal line. The scrollback buffer starts at line <code>-1</code> and extends to
1120line <a href="#item_nsaved"><code>-$term-&gt;nsaved</code></a>. Nothing will be returned if a nonexistent line 1139line <code>-$term-&gt;nsaved</code>. Nothing will be returned if a nonexistent line
1121is requested. 1140is requested.
1122</dd> 1141</dd>
1123<dd> 1142<dd>
1124<p>If <code>$new_text</code> is specified, it will replace characters in the current 1143<p>If <code>$new_text</code> is specified, it will replace characters in the current
1125line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful 1144line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines