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.34 by root, Fri Jan 20 16:02:20 2006 UTC vs.
Revision 1.39 by root, Wed Jan 25 21:48:47 2006 UTC

121<dd> 121<dd>
122<pre> 122<pre>
123 URxvt.selection.pattern-0: \\|([^|]+)\\|</pre> 123 URxvt.selection.pattern-0: \\|([^|]+)\\|</pre>
124</dd> 124</dd>
125<dd> 125<dd>
126<p>Another example: Programs I use often output ``absolute path: '' at the
127beginning of a line when they process multiple files. The following
128pattern matches the filename (note, there is a single space at the very
129end):</p>
130</dd>
131<dd>
132<pre>
133 URxvt.selection.pattern-0: ^(/[^:]+):\</pre>
134</dd>
135<dd>
126<p>You can look at the source of the selection extension to see more 136<p>You can look at the source of the selection extension to see more
127interesting uses, such as parsing a line from beginning to end.</p> 137interesting uses, such as parsing a line from beginning to end.</p>
128</dd> 138</dd>
129<dd> 139<dd>
130<p>This extension also offers following bindable keyboard commands:</p> 140<p>This extension also offers following bindable keyboard commands:</p>
150<dt><strong>selection-popup (enabled by default)</strong><br /> 160<dt><strong>selection-popup (enabled by default)</strong><br />
151</dt> 161</dt>
152<dd> 162<dd>
153Binds a popup menu to Ctrl-Button3 that lets you convert the selection 163Binds a popup menu to Ctrl-Button3 that lets you convert the selection
154text into various other formats/action (such as uri unescaping, perl 164text into various other formats/action (such as uri unescaping, perl
155evalution, web-browser starting etc.), depending on content. 165evaluation, web-browser starting etc.), depending on content.
156</dd> 166</dd>
157<dd> 167<dd>
158<p>Other extensions can extend this popup menu by pushing a code reference 168<p>Other extensions can extend this popup menu by pushing a code reference
159onto <code>@{ $term-</code>{selection_popup_hook} }&gt;, that is called whenever the 169onto <code>@{ $term-</code>{selection_popup_hook} }&gt;, that is called whenever the
160popup is displayed.</p> 170popup is displayed.</p>
195was started, while <code>Enter</code> or <code>Return</code> stay at the current position and 205was started, while <code>Enter</code> or <code>Return</code> stay at the current position and
196additionally stores the first match in the current line into the primary 206additionally stores the first match in the current line into the primary
197selection.</p> 207selection.</p>
198</dd> 208</dd>
199<p></p> 209<p></p>
210<dt><strong><a name="item_readline">readline (enabled by default)</a></strong><br />
211</dt>
212<dd>
213A support package that tries to make editing with readline easier. At the
214moment, it reacts to clicking with the left mouse button by trying to
215move the text cursor to this position. It does so by generating as many
216cursor-left or cursor-right keypresses as required (the this only works
217for programs that correctly support wide characters).
218</dd>
219<dd>
220<p>To avoid too many false positives, this is only done when:</p>
221</dd>
222<dl>
223<dt><strong><a name="item__2d_the_tty_is_in_icanon_state_2e">- the tty is in ICANON state.</a></strong><br />
224</dt>
225<dt><strong><a name="item__2d_the_text_cursor_is_visible_2e">- the text cursor is visible.</a></strong><br />
226</dt>
227<dt><strong><a name="item__2d_the_primary_screen_is_currently_being_displaye">- the primary screen is currently being displayed.</a></strong><br />
228</dt>
229<dt><strong><a name="item_same">- the mouse is on the same (multi-row-) line as the text cursor.</a></strong><br />
230</dt>
231</dl>
232<p>The normal selection mechanism isn't disabled, so quick successive clicks
233might interfere with selection creation in harmless ways.</p>
200<dt><strong><a name="item_selection_2dautotransform">selection-autotransform</a></strong><br /> 234<dt><strong><a name="item_selection_2dautotransform">selection-autotransform</a></strong><br />
201</dt> 235</dt>
202<dd> 236<dd>
203This selection allows you to do automatic transforms on a selection 237This selection allows you to do automatic transforms on a selection
204whenever a selection is made. 238whenever a selection is made.
255is, it implements what is commonly refered to as ``tabbed terminal''. The topmost line 289is, it implements what is commonly refered to as ``tabbed terminal''. The topmost line
256displays a ``[NEW]'' button, which, when clicked, will add a new tab, followed by one 290displays a ``[NEW]'' button, which, when clicked, will add a new tab, followed by one
257button per tab. 291button per tab.
258</dd> 292</dd>
259<dd> 293<dd>
260<p>Clicking a button will activate that tab. Pressing Shift-Left and 294<p>Clicking a button will activate that tab. Pressing <strong>Shift-Left</strong> and
261Shift-Right will switch to the tab left or right of the current one.</p> 295<strong>Shift-Right</strong> will switch to the tab left or right of the current one,
296while <strong>Shift-Down</strong> creates a new tab.</p>
262</dd> 297</dd>
263<p></p> 298<p></p>
264<dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br /> 299<dt><strong><a name="item_mark_2durls">mark-urls</a></strong><br />
265</dt> 300</dt>
266<dd> 301<dd>
268make them clickable. When middle-clicked, the program specified in the 303make them clickable. When middle-clicked, the program specified in the
269resource <code>urlLauncher</code> (default <code>x-www-browser</code>) will be started with 304resource <code>urlLauncher</code> (default <code>x-www-browser</code>) will be started with
270the URL as first argument. 305the URL as first argument.
271</dd> 306</dd>
272<p></p> 307<p></p>
308<dt><strong><a name="item_xim_2donthespot">xim-onthespot</a></strong><br />
309</dt>
310<dd>
311This (experimental) perl extension implements OnTheSpot editing. It does
312not work perfectly, and some input methods don't seem to work well with
313OnTheSpot editing in general, but it seems to work at leats for SCIM and
314kinput2.
315</dd>
316<dd>
317<p>You enable it by specifying this extension and a preedit style of
318<code>OnTheSpot</code>, i.e.:</p>
319</dd>
320<dd>
321<pre>
322 rxvt -pt OnTheSpot -pe xim-onthespot</pre>
323</dd>
324<p></p>
273<dt><strong><a name="item_automove_2dbackground">automove-background</a></strong><br /> 325<dt><strong><a name="item_automove_2dbackground">automove-background</a></strong><br />
274</dt> 326</dt>
275<dd> 327<dd>
276This is basically a one-line extension that dynamically changes the background pixmap offset 328This is basically a one-line extension that dynamically changes the background pixmap offset
277to the window position, in effect creating the same effect as pseudo transparency with 329to the window position, in effect creating the same effect as pseudo transparency with
294</dt> 346</dt>
295<dd> 347<dd>
296Displays a digital clock using the built-in overlay. 348Displays a digital clock using the built-in overlay.
297</dd> 349</dd>
298<p></p> 350<p></p>
299<dt><strong><a name="item_example_2drefresh_2dhooks">example-refresh-hooks</a></strong><br /> 351<dt><strong><a name="item_remote_2dclipboard">remote-clipboard</a></strong><br />
300</dt> 352</dt>
353<dd>
354Somewhat of a misnomer, this extension adds two menu entries to the
355selection popup that allows one ti run external commands to store the
356selection somewhere and fetch it again.
301<dd> 357</dd>
302Displays a very simple digital clock in the upper right corner of the 358<dd>
303window. Illustrates overwriting the refresh callbacks to create your own 359<p>We use it to implement a ``distributed selection mechanism'', which just
304overlays or changes. 360means that one command uploads the file to a remote server, and another
361reads it.</p>
362</dd>
363<dd>
364<p>The commands can be set using the <code>URxvt.remote-selection.store</code> and
365<code>URxvt.remote-selection.fetch</code> resources. The first should read the
366selection to store from STDIN (always in UTF-8), the second should provide
367the selection data on STDOUT (also in UTF-8).</p>
368</dd>
369<dd>
370<p>The defaults (which are likely useless to you) use rsh and cat:</p>
371</dd>
372<dd>
373<pre>
374 URxvt.remote-selection.store: rsh ruth 'cat &gt;/tmp/distributed-selection'
375 URxvt.remote-selection.fetch: rsh ruth 'cat /tmp/distributed-selection'</pre>
305</dd> 376</dd>
306<p></p> 377<p></p>
307<dt><strong><a name="item_selection_2dpastebin">selection-pastebin</a></strong><br /> 378<dt><strong><a name="item_selection_2dpastebin">selection-pastebin</a></strong><br />
308</dt> 379</dt>
309<dd> 380<dd>
342for the filename):</p> 413for the filename):</p>
343</dd> 414</dd>
344<dd> 415<dd>
345<pre> 416<pre>
346 URxvt.selection-pastebin.url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre> 417 URxvt.selection-pastebin.url: <a href="http://www.ta-sa.org/files/txt/%">http://www.ta-sa.org/files/txt/%</a></pre>
418</dd>
419<p></p>
420<dt><strong><a name="item_example_2drefresh_2dhooks">example-refresh-hooks</a></strong><br />
421</dt>
422<dd>
423Displays a very simple digital clock in the upper right corner of the
424window. Illustrates overwriting the refresh callbacks to create your own
425overlays or changes.
347</dd> 426</dd>
348<p></p></dl> 427<p></p></dl>
349<p> 428<p>
350</p> 429</p>
351<hr /> 430<hr />
452</dd> 531</dd>
453<p></p> 532<p></p>
454<dt><strong><a name="item_on_destroy__24term">on_destroy $term</a></strong><br /> 533<dt><strong><a name="item_on_destroy__24term">on_destroy $term</a></strong><br />
455</dt> 534</dt>
456<dd> 535<dd>
457Called whenever something tries to destroy terminal, before doing anything 536Called whenever something tries to destroy terminal, when the terminal is
458yet. If this hook returns true, then destruction is skipped, but this is 537still fully functional (not for long, though).
459rarely a good idea.
460</dd> 538</dd>
461<p></p> 539<p></p>
462<dt><strong><a name="item_on_reset__24term">on_reset $term</a></strong><br /> 540<dt><strong><a name="item_on_reset__24term">on_reset $term</a></strong><br />
463</dt> 541</dt>
464<dd> 542<dd>
602</dt> 680</dt>
603<dd> 681<dd>
604Called just after the screen gets redrawn. See <code>on_refresh_begin</code>. 682Called just after the screen gets redrawn. See <code>on_refresh_begin</code>.
605</dd> 683</dd>
606<p></p> 684<p></p>
607<dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br /> 685<dt><strong><a name="item_on_user_command__24term_2c__24string">on_user_command $term, $string</a></strong><br />
608</dt> 686</dt>
609<dd> 687<dd>
610Called whenever the user presses a key combination that has a 688Called whenever the a user-configured event is being activated (e.g. via
611<code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> 689a <code>perl:string</code> action bound to a key, see description of the <strong>keysym</strong>
612resource in the <code>rxvt(1)</code> manpage). 690resource in the <code>rxvt(1)</code> manpage).
691</dd>
692<dd>
693<p>The event is simply the action string. This interface is assumed to change
694slightly in the future.</p>
613</dd> 695</dd>
614<p></p> 696<p></p>
615<dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> 697<dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br />
616</dt> 698</dt>
617<dd> 699<dd>
634focus out processing. 716focus out processing.
635</dd> 717</dd>
636<p></p> 718<p></p>
637<dt><strong><a name="item_on_configure_notify__24term_2c__24event">on_configure_notify $term, $event</a></strong><br /> 719<dt><strong><a name="item_on_configure_notify__24term_2c__24event">on_configure_notify $term, $event</a></strong><br />
638</dt> 720</dt>
721<dt><strong><a name="item_on_property_notify__24term_2c__24event">on_property_notify $term, $event</a></strong><br />
722</dt>
639<dt><strong><a name="item_on_key_press__24term_2c__24event_2c__24keysym_2c__">on_key_press $term, $event, $keysym, $octets</a></strong><br /> 723<dt><strong><a name="item_on_key_press__24term_2c__24event_2c__24keysym_2c__">on_key_press $term, $event, $keysym, $octets</a></strong><br />
640</dt> 724</dt>
641<dt><strong><a name="item_on_key_release__24term_2c__24event_2c__24keysym">on_key_release $term, $event, $keysym</a></strong><br /> 725<dt><strong><a name="item_on_key_release__24term_2c__24event_2c__24keysym">on_key_release $term, $event, $keysym</a></strong><br />
642</dt> 726</dt>
643<dt><strong><a name="item_on_button_press__24term_2c__24event">on_button_press $term, $event</a></strong><br /> 727<dt><strong><a name="item_on_button_press__24term_2c__24event">on_button_press $term, $event</a></strong><br />
654Called whenever the corresponding X event is received for the terminal If 738Called whenever the corresponding X event is received for the terminal If
655the hook returns true, then the even will be ignored by rxvt-unicode. 739the hook returns true, then the even will be ignored by rxvt-unicode.
656</dd> 740</dd>
657<dd> 741<dd>
658<p>The event is a hash with most values as named by Xlib (see the XEvent 742<p>The event is a hash with most values as named by Xlib (see the XEvent
659manpage), with the additional members <code>row</code> and <code>col</code>, which are the row 743manpage), with the additional members <code>row</code> and <code>col</code>, which are the
660and column under the mouse cursor.</p> 744(real, not screen-based) row and column under the mouse cursor.</p>
661</dd> 745</dd>
662<dd> 746<dd>
663<p><code>on_key_press</code> additionally receives the string rxvt-unicode would 747<p><code>on_key_press</code> additionally receives the string rxvt-unicode would
664output, if any, in locale-specific encoding.</p> 748output, if any, in locale-specific encoding.</p>
665</dd> 749</dd>
1141<p>Normally its not a good idea to use this function, as programs might be 1225<p>Normally its not a good idea to use this function, as programs might be
1142confused by changes in cursor position or scrolling. Its useful inside a 1226confused by changes in cursor position or scrolling. Its useful inside a
1143<code>on_add_lines</code> hook, though.</p> 1227<code>on_add_lines</code> hook, though.</p>
1144</dd> 1228</dd>
1145<p></p> 1229<p></p>
1230<dt><strong><a name="item_scr_change_screen">$term-&gt;scr_change_screen ($screen)</a></strong><br />
1231</dt>
1232<dd>
1233Switch to given screen - 0 primary, 1 secondary.
1234</dd>
1235<p></p>
1146<dt><strong><a name="item_cmd_parse">$term-&gt;cmd_parse ($octets)</a></strong><br /> 1236<dt><strong><a name="item_cmd_parse">$term-&gt;cmd_parse ($octets)</a></strong><br />
1147</dt> 1237</dt>
1148<dd> 1238<dd>
1149Similar to <a href="#item_scr_add_lines"><code>scr_add_lines</code></a>, but the argument must be in the 1239Similar to <a href="#item_scr_add_lines"><code>scr_add_lines</code></a>, but the argument must be in the
1150locale-specific encoding of the terminal and can contain command sequences 1240locale-specific encoding of the terminal and can contain command sequences
1166be used to suppress input and output handling to the pty/tty. See the 1256be used to suppress input and output handling to the pty/tty. See the
1167description of <a href="#item_events"><code>urxvt::timer-&gt;events</code></a>. Make sure to always restore 1257description of <a href="#item_events"><code>urxvt::timer-&gt;events</code></a>. Make sure to always restore
1168the previous value. 1258the previous value.
1169</dd> 1259</dd>
1170<p></p> 1260<p></p>
1261<dt><strong><a name="item_pty_fd">$fd = $term-&gt;pty_fd</a></strong><br />
1262</dt>
1263<dd>
1264Returns the master file descriptor for the pty in use, or <code>-1</code> if no pty
1265is used.
1266</dd>
1267<p></p>
1171<dt><strong><a name="item_parent">$windowid = $term-&gt;parent</a></strong><br /> 1268<dt><strong><a name="item_parent">$windowid = $term-&gt;parent</a></strong><br />
1172</dt> 1269</dt>
1173<dd> 1270<dd>
1174Return the window id of the toplevel window. 1271Return the window id of the toplevel window.
1175</dd> 1272</dd>
1245<dt><strong><a name="item_modnumlockmask">$modifiermask = $term-&gt;ModNumLockMask</a></strong><br /> 1342<dt><strong><a name="item_modnumlockmask">$modifiermask = $term-&gt;ModNumLockMask</a></strong><br />
1246</dt> 1343</dt>
1247<dd> 1344<dd>
1248Return the modifier masks corresponding to the ``ISO Level 3 Shift'' (often 1345Return the modifier masks corresponding to the ``ISO Level 3 Shift'' (often
1249AltGr), the meta key (often Alt) and the num lock key, if applicable. 1346AltGr), the meta key (often Alt) and the num lock key, if applicable.
1347</dd>
1348<p></p>
1349<dt><strong><a name="item_current_screen">$screen = $term-&gt;current_screen</a></strong><br />
1350</dt>
1351<dd>
1352Returns the currently displayed screen (0 primary, 1 secondary).
1353</dd>
1354<p></p>
1355<dt><strong><a name="item_hidden_cursor">$cursor_is_hidden = $term-&gt;hidden_cursor</a></strong><br />
1356</dt>
1357<dd>
1358Returns wether the cursor is currently hidden or not.
1250</dd> 1359</dd>
1251<p></p> 1360<p></p>
1252<dt><strong><a name="item_view_start">$view_start = $term-&gt;view_start ([$newvalue])</a></strong><br /> 1361<dt><strong><a name="item_view_start">$view_start = $term-&gt;view_start ([$newvalue])</a></strong><br />
1253</dt> 1362</dt>
1254<dd> 1363<dd>
1283to replace only parts of a line. The font index in the rendition will 1392to replace only parts of a line. The font index in the rendition will
1284automatically be updated.</p> 1393automatically be updated.</p>
1285</dd> 1394</dd>
1286<dd> 1395<dd>
1287<p><a href="#item__24text"><code>$text</code></a> is in a special encoding: tabs and wide characters that use more 1396<p><a href="#item__24text"><code>$text</code></a> is in a special encoding: tabs and wide characters that use more
1288than one cell when displayed are padded with urxvt::NOCHAR characters 1397than one cell when displayed are padded with <code>$urxvt::NOCHAR</code> (chr 65535)
1289(<code>chr 65535</code>). Characters with combining characters and other characters 1398characters. Characters with combining characters and other characters that
1290that do not fit into the normal tetx encoding will be replaced with 1399do not fit into the normal tetx encoding will be replaced with characters
1291characters in the private use area.</p> 1400in the private use area.</p>
1292</dd> 1401</dd>
1293<dd> 1402<dd>
1294<p>You have to obey this encoding when changing text. The advantage is 1403<p>You have to obey this encoding when changing text. The advantage is
1295that <code>substr</code> and similar functions work on screen cells and not on 1404that <code>substr</code> and similar functions work on screen cells and not on
1296characters.</p> 1405characters.</p>
1430</dt> 1539</dt>
1431<dd> 1540<dd>
1432Calls XUngrab for the most recent grab. Is called automatically on 1541Calls XUngrab for the most recent grab. Is called automatically on
1433evaluation errors, as it is better to lose the grab in the error case as 1542evaluation errors, as it is better to lose the grab in the error case as
1434the session. 1543the session.
1544</dd>
1545<p></p>
1546<dt><strong><a name="item_xinternatom">$atom = $term-&gt;XInternAtom ($atom_name[, $only_if_exists])</a></strong><br />
1547</dt>
1548<dt><strong><a name="item_xgetatomname">$atom_name = $term-&gt;XGetAtomName ($atom)</a></strong><br />
1549</dt>
1550<dt><strong><a name="item_xlistproperties">@atoms = $term-&gt;XListProperties ($window)</a></strong><br />
1551</dt>
1552<dt><strong><a name="item_xgetwindowproperty">($type,$format,$octets) = $term-&gt;XGetWindowProperty ($window, $property)</a></strong><br />
1553</dt>
1554<dt><strong><a name="item_xchangewindowproperty">$term-&gt;XChangeWindowProperty ($window, $property, $type, $format, $octets)</a></strong><br />
1555</dt>
1556<dt><strong><a name="item_xdeleteproperty">$term-&gt;XDeleteProperty ($window, $property)</a></strong><br />
1557</dt>
1558<dt><strong><a name="item_defaultrootwindow">$window = $term-&gt;DefaultRootWindow</a></strong><br />
1559</dt>
1560<dt><strong><a name="item_xreparentwindow">$term-&gt;XReparentWindow ($window, $parent, [$x, $y])</a></strong><br />
1561</dt>
1562<dt><strong><a name="item_xmapwindow">$term-&gt;XMapWindow ($window)</a></strong><br />
1563</dt>
1564<dt><strong><a name="item_xunmapwindow">$term-&gt;XUnmapWindow ($window)</a></strong><br />
1565</dt>
1566<dt><strong><a name="item_xmoveresizewindow">$term-&gt;XMoveResizeWindow ($window, $x, $y, $width, $height)</a></strong><br />
1567</dt>
1568<dt><strong><a name="item_xtranslatecoordinates">($x, $y, $child_window) = $term-&gt;XTranslateCoordinates ($src, $dst, $x, $y)</a></strong><br />
1569</dt>
1570<dt><strong><a name="item_xchangeinput">$term-&gt;XChangeInput ($window, $add_events[, $del_events])</a></strong><br />
1571</dt>
1572<dd>
1573Various X or X-related functions. The <code>$term</code> object only serves as
1574the source of the display, otherwise those functions map more-or-less
1575directory onto the X functions of the same name.
1435</dd> 1576</dd>
1436<p></p></dl> 1577<p></p></dl>
1437<p> 1578<p>
1438</p> 1579</p>
1439<h2><a name="the_urxvt__popup_class">The <code>urxvt::popup</code> Class</a></h2> 1580<h2><a name="the_urxvt__popup_class">The <code>urxvt::popup</code> Class</a></h2>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines