… | |
… | |
91 | |
91 | |
92 | =item selection-popup (enabled by default) |
92 | =item selection-popup (enabled by default) |
93 | |
93 | |
94 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
94 | Binds a popup menu to Ctrl-Button3 that lets you convert the selection |
95 | text into various other formats/action (such as uri unescaping, perl |
95 | text into various other formats/action (such as uri unescaping, perl |
96 | evalution, web-browser starting etc.), depending on content. |
96 | evaluation, web-browser starting etc.), depending on content. |
97 | |
97 | |
98 | Other extensions can extend this popup menu by pushing a code reference |
98 | Other extensions can extend this popup menu by pushing a code reference |
99 | onto C<@{ $term->{selection_popup_hook} }>, that is called whenever the |
99 | onto C<@{ $term->{selection_popup_hook} }>, that is called whenever the |
100 | popup is displayed. |
100 | popup is displayed. |
101 | |
101 | |
… | |
… | |
162 | |
162 | |
163 | The first line tells the selection code to treat the unchanging part of |
163 | The first line tells the selection code to treat the unchanging part of |
164 | every error message as a selection pattern, and the second line transforms |
164 | every error message as a selection pattern, and the second line transforms |
165 | the message into vi commands to load the file. |
165 | the message into vi commands to load the file. |
166 | |
166 | |
|
|
167 | =item tabbed |
|
|
168 | |
|
|
169 | This transforms the terminal into a tabbar with additional terminals, that |
|
|
170 | is, it implements what is commonly refered to as "tabbed terminal". The topmost line |
|
|
171 | displays a "[NEW]" button, which, when clicked, will add a new tab, followed by one |
|
|
172 | button per tab. |
|
|
173 | |
|
|
174 | Clicking a button will activate that tab. Pressing B<Shift-Left> and |
|
|
175 | B<Shift-Right> will switch to the tab left or right of the current one, |
|
|
176 | while B<Shift-Down> creates a new tab. |
|
|
177 | |
167 | =item mark-urls |
178 | =item mark-urls |
168 | |
179 | |
169 | Uses per-line display filtering (C<on_line_update>) to underline urls and |
180 | Uses per-line display filtering (C<on_line_update>) to underline urls and |
170 | make them clickable. When middle-clicked, the program specified in the |
181 | make them clickable. When middle-clicked, the program specified in the |
171 | resource C<urlLauncher> (default C<x-www-browser>) will be started with |
182 | resource C<urlLauncher> (default C<x-www-browser>) will be started with |
… | |
… | |
465 | Called wheneever the window loses keyboard focus, before rxvt-unicode does |
476 | Called wheneever the window loses keyboard focus, before rxvt-unicode does |
466 | focus out processing. |
477 | focus out processing. |
467 | |
478 | |
468 | =item on_configure_notify $term, $event |
479 | =item on_configure_notify $term, $event |
469 | |
480 | |
|
|
481 | =item on_property_notify $term, $event |
|
|
482 | |
470 | =item on_key_press $term, $event, $keysym, $octets |
483 | =item on_key_press $term, $event, $keysym, $octets |
471 | |
484 | |
472 | =item on_key_release $term, $event, $keysym |
485 | =item on_key_release $term, $event, $keysym |
473 | |
486 | |
474 | =item on_button_press $term, $event |
487 | =item on_button_press $term, $event |
… | |
… | |
483 | |
496 | |
484 | Called whenever the corresponding X event is received for the terminal If |
497 | Called whenever the corresponding X event is received for the terminal If |
485 | the hook returns true, then the even will be ignored by rxvt-unicode. |
498 | the hook returns true, then the even will be ignored by rxvt-unicode. |
486 | |
499 | |
487 | The event is a hash with most values as named by Xlib (see the XEvent |
500 | The event is a hash with most values as named by Xlib (see the XEvent |
488 | manpage), with the additional members C<row> and C<col>, which are the row |
501 | manpage), with the additional members C<row> and C<col>, which are the |
489 | and column under the mouse cursor. |
502 | (real, not screen-based) row and column under the mouse cursor. |
490 | |
503 | |
491 | C<on_key_press> additionally receives the string rxvt-unicode would |
504 | C<on_key_press> additionally receives the string rxvt-unicode would |
492 | output, if any, in locale-specific encoding. |
505 | output, if any, in locale-specific encoding. |
493 | |
506 | |
494 | subwindow. |
507 | subwindow. |
|
|
508 | |
|
|
509 | =item on_client_message $term, $event |
|
|
510 | |
|
|
511 | =item on_wm_protocols $term, $event |
|
|
512 | |
|
|
513 | =item on_wm_delete_window $term, $event |
|
|
514 | |
|
|
515 | Called when various types of ClientMessage events are received (all with |
|
|
516 | format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW). |
495 | |
517 | |
496 | =back |
518 | =back |
497 | |
519 | |
498 | =cut |
520 | =cut |
499 | |
521 | |
… | |
… | |
1546 | |
1568 | |
1547 | Calls XUngrab for the most recent grab. Is called automatically on |
1569 | Calls XUngrab for the most recent grab. Is called automatically on |
1548 | evaluation errors, as it is better to lose the grab in the error case as |
1570 | evaluation errors, as it is better to lose the grab in the error case as |
1549 | the session. |
1571 | the session. |
1550 | |
1572 | |
|
|
1573 | =item $atom = $term->XInternAtom ($atom_name[, $only_if_exists]) |
|
|
1574 | |
|
|
1575 | =item $atom_name = $term->XGetAtomName ($atom) |
|
|
1576 | |
|
|
1577 | =item @atoms = $term->XListProperties ($window) |
|
|
1578 | |
|
|
1579 | =item ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property) |
|
|
1580 | |
|
|
1581 | =item $term->XChangeWindowProperty ($window, $property, $type, $format, $octets) |
|
|
1582 | |
|
|
1583 | =item $term->XDeleteProperty ($window, $property) |
|
|
1584 | |
|
|
1585 | =item $window = $term->DefaultRootWindow |
|
|
1586 | |
|
|
1587 | =item $term->XReparentWindow ($window, $parent, [$x, $y]) |
|
|
1588 | |
|
|
1589 | =item $term->XMapWindow ($window) |
|
|
1590 | |
|
|
1591 | =item $term->XUnmapWindow ($window) |
|
|
1592 | |
|
|
1593 | =item $term->XMoveResizeWindow ($window, $x, $y, $width, $height) |
|
|
1594 | |
|
|
1595 | =item ($x, $y, $child_window) = $term->XTranslateCoordinates ($src, $dst, $x, $y) |
|
|
1596 | |
|
|
1597 | =item $term->XChangeInput ($window, $add_events[, $del_events]) |
|
|
1598 | |
|
|
1599 | Various X or X-related functions. The C<$term> object only serves as |
|
|
1600 | the source of the display, otherwise those functions map more-or-less |
|
|
1601 | directory onto the X functions of the same name. |
|
|
1602 | |
1551 | =back |
1603 | =back |
1552 | |
1604 | |
1553 | =cut |
1605 | =cut |
1554 | |
1606 | |
1555 | package urxvt::popup; |
1607 | package urxvt::popup; |
… | |
… | |
1790 | |
1842 | |
1791 | Stop watching for events on the given filehandle. |
1843 | Stop watching for events on the given filehandle. |
1792 | |
1844 | |
1793 | =back |
1845 | =back |
1794 | |
1846 | |
|
|
1847 | =head2 The C<urxvt::iw> Class |
|
|
1848 | |
|
|
1849 | This class implements idle watchers, that get called automatically when |
|
|
1850 | the process is idle. They should return as fast as possible, after doing |
|
|
1851 | some useful work. |
|
|
1852 | |
|
|
1853 | =over 4 |
|
|
1854 | |
|
|
1855 | =item $iw = new urxvt::iw |
|
|
1856 | |
|
|
1857 | Create a new idle watcher object in stopped state. |
|
|
1858 | |
|
|
1859 | =item $iw = $iw->cb (sub { my ($iw) = @_; ... }) |
|
|
1860 | |
|
|
1861 | Set the callback to be called when the watcher triggers. |
|
|
1862 | |
|
|
1863 | =item $timer = $timer->start |
|
|
1864 | |
|
|
1865 | Start the watcher. |
|
|
1866 | |
|
|
1867 | =item $timer = $timer->stop |
|
|
1868 | |
|
|
1869 | Stop the watcher. |
|
|
1870 | |
|
|
1871 | =back |
|
|
1872 | |
|
|
1873 | =head2 The C<urxvt::pw> Class |
|
|
1874 | |
|
|
1875 | This class implements process watchers. They create an event whenever a |
|
|
1876 | process exits, after which they stop automatically. |
|
|
1877 | |
|
|
1878 | my $pid = fork; |
|
|
1879 | ... |
|
|
1880 | $term->{pw} = urxvt::pw |
|
|
1881 | ->new |
|
|
1882 | ->start ($pid) |
|
|
1883 | ->cb (sub { |
|
|
1884 | my ($pw, $exit_status) = @_; |
|
|
1885 | ... |
|
|
1886 | }); |
|
|
1887 | |
|
|
1888 | =over 4 |
|
|
1889 | |
|
|
1890 | =item $pw = new urxvt::pw |
|
|
1891 | |
|
|
1892 | Create a new process watcher in stopped state. |
|
|
1893 | |
|
|
1894 | =item $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... }) |
|
|
1895 | |
|
|
1896 | Set the callback to be called when the timer triggers. |
|
|
1897 | |
|
|
1898 | =item $pw = $timer->start ($pid) |
|
|
1899 | |
|
|
1900 | Tells the wqtcher to start watching for process C<$pid>. |
|
|
1901 | |
|
|
1902 | =item $pw = $pw->stop |
|
|
1903 | |
|
|
1904 | Stop the watcher. |
|
|
1905 | |
|
|
1906 | =back |
|
|
1907 | |
1795 | =head1 ENVIRONMENT |
1908 | =head1 ENVIRONMENT |
1796 | |
1909 | |
1797 | =head2 URXVT_PERL_VERBOSITY |
1910 | =head2 URXVT_PERL_VERBOSITY |
1798 | |
1911 | |
1799 | This variable controls the verbosity level of the perl extension. Higher |
1912 | This variable controls the verbosity level of the perl extension. Higher |