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 "you selected ", $_[0]->selection; |
59 | warn "you selected ", $_[0]->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 |
71 | the <code>perl</code> resource are loaded and associated with it.</p> |
71 | the <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 |
73 | thus must be encoded as UTF-8.</p> |
73 | thus 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 |
75 | scripts will be shared (but not enabled) for all terminals.</p> |
75 | scripts 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 |
81 | find them in <em>/usr/local/lib/urxvt/perl/</em>.</p> |
81 | find 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 <extensionname></pre> |
84 | rxvt -pe <extensionname></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 |
… | |
… | |
489 | <dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br /> |
489 | <dt><strong><a name="item_on_keyboard_command__24term_2c__24string">on_keyboard_command $term, $string</a></strong><br /> |
490 | </dt> |
490 | </dt> |
491 | <dd> |
491 | <dd> |
492 | Called whenever the user presses a key combination that has a |
492 | Called 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> |
493 | <code>perl:string</code> action bound to it (see description of the <strong>keysym</strong> |
494 | resource in the <code>urxvt(1)</code> manpage). |
494 | resource in the <code>rxvt(1)</code> manpage). |
495 | </dd> |
495 | </dd> |
496 | <p></p> |
496 | <p></p> |
497 | <dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> |
497 | <dt><strong><a name="item_on_x_event__24term_2c__24event">on_x_event $term, $event</a></strong><br /> |
498 | </dt> |
498 | </dt> |
499 | <dd> |
499 | <dd> |
… | |
… | |
735 | <p></p> |
735 | <p></p> |
736 | <dt><strong><a name="item_destroy">$term->destroy</a></strong><br /> |
736 | <dt><strong><a name="item_destroy">$term->destroy</a></strong><br /> |
737 | </dt> |
737 | </dt> |
738 | <dd> |
738 | <dd> |
739 | Destroy the terminal object (close the window, free resources |
739 | Destroy the terminal object (close the window, free resources |
740 | etc.). Please note that urxvt will not exit as long as any event |
740 | etc.). Please note that rxvt will not exit as long as any event |
741 | watchers (timers, io watchers) are still active. |
741 | watchers (timers, io watchers) are still active. |
742 | </dd> |
742 | </dd> |
743 | <p></p> |
743 | <p></p> |
744 | <dt><strong><a name="item_option">$isset = $term->option ($optval[, $set])</a></strong><br /> |
744 | <dt><strong><a name="item_option">$isset = $term->option ($optval[, $set])</a></strong><br /> |
745 | </dt> |
745 | </dt> |
… | |
… | |
820 | <p></p> |
820 | <p></p> |
821 | <dt><strong><a name="item_parse_keysym">$success = $term->parse_keysym ($keysym_spec, $command_string)</a></strong><br /> |
821 | <dt><strong><a name="item_parse_keysym">$success = $term->parse_keysym ($keysym_spec, $command_string)</a></strong><br /> |
822 | </dt> |
822 | </dt> |
823 | <dd> |
823 | <dd> |
824 | Adds a keymap translation exactly as specified via a resource. See the |
824 | Adds a keymap translation exactly as specified via a resource. See the |
825 | <code>keysym</code> resource in the <code>urxvt(1)</code> manpage. |
825 | <code>keysym</code> resource in the <code>rxvt(1)</code> manpage. |
826 | </dd> |
826 | </dd> |
827 | <p></p> |
827 | <p></p> |
828 | <dt><strong><a name="item_rstyle">$rend = $term->rstyle ([$new_rstyle])</a></strong><br /> |
828 | <dt><strong><a name="item_rstyle">$rend = $term->rstyle ([$new_rstyle])</a></strong><br /> |
829 | </dt> |
829 | </dt> |
830 | <dd> |
830 | <dd> |
… | |
… | |
1054 | </dt> |
1054 | </dt> |
1055 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1055 | <dt><strong><a name="item_savelines">$max_scrollback = $term->saveLines</a></strong><br /> |
1056 | </dt> |
1056 | </dt> |
1057 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1057 | <dt><strong><a name="item_total_rows">$nrow_plus_saveLines = $term->total_rows</a></strong><br /> |
1058 | </dt> |
1058 | </dt> |
1059 | <dt><strong><a name="item_nsaved">$lines_in_scrollback = $term->nsaved</a></strong><br /> |
1059 | <dt><strong><a name="item_top_row">$topmost_scrollback_row = $term->top_row</a></strong><br /> |
1060 | </dt> |
1060 | </dt> |
1061 | <dd> |
1061 | <dd> |
1062 | Return various integers describing terminal characteristics. |
1062 | Return various integers describing terminal characteristics. |
1063 | </dd> |
1063 | </dd> |
1064 | <p></p> |
1064 | <p></p> |
… | |
… | |
1093 | </dd> |
1093 | </dd> |
1094 | <p></p> |
1094 | <p></p> |
1095 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1095 | <dt><strong><a name="item_view_start">$view_start = $term->view_start ([$newvalue])</a></strong><br /> |
1096 | </dt> |
1096 | </dt> |
1097 | <dd> |
1097 | <dd> |
1098 | Returns the negative row number of the topmost line. Minimum value is |
1098 | Returns the row number of the topmost displayed line. Maximum value is |
1099 | <code>0</code>, which displays the normal terminal contents. Larger values scroll |
1099 | <code>0</code>, which displays the normal terminal contents. Lower values scroll |
1100 | this many lines into the scrollback buffer. |
1100 | this many lines into the scrollback buffer. |
1101 | </dd> |
1101 | </dd> |
1102 | <p></p> |
1102 | <p></p> |
1103 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1103 | <dt><strong><a name="item_want_refresh">$term->want_refresh</a></strong><br /> |
1104 | </dt> |
1104 | </dt> |
… | |
… | |
1115 | </dt> |
1115 | </dt> |
1116 | <dd> |
1116 | <dd> |
1117 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1117 | Returns the text of the entire row with number <code>$row_number</code>. Row <code>0</code> |
1118 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1118 | is the topmost terminal line, row <code>$term->$ncol-1</code> is the bottommost |
1119 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1119 | terminal line. The scrollback buffer starts at line <code>-1</code> and extends to |
1120 | line <a href="#item_nsaved"><code>-$term->nsaved</code></a>. Nothing will be returned if a nonexistent line |
1120 | line <code>-$term->nsaved</code>. Nothing will be returned if a nonexistent line |
1121 | is requested. |
1121 | is requested. |
1122 | </dd> |
1122 | </dd> |
1123 | <dd> |
1123 | <dd> |
1124 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1124 | <p>If <code>$new_text</code> is specified, it will replace characters in the current |
1125 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |
1125 | line, starting at column <code>$start_col</code> (default <code>0</code>), which is useful |