--- rxvt-unicode/src/urxvt.pm 2010/07/02 12:44:45 1.185 +++ rxvt-unicode/src/urxvt.pm 2011/11/20 10:49:56 1.199 @@ -261,14 +261,16 @@ with numbered patterns, in a manner similar to the "selection" extension. The launcher can also be overridden on a per-pattern basis. -It is possible to activate the most recently seen match from the keyboard. -Simply bind a keysym to "perl:matcher" as seen in the example below. +It is possible to activate the most recently seen match or a list of matches +from the keyboard. Simply bind a keysym to "perl:matcher:last" or +"perl:matcher:list" as seen in the example below. Example configuration: URxvt.perl-ext: default,matcher URxvt.urlLauncher: sensible-browser - URxvt.keysym.C-Delete: perl:matcher + URxvt.keysym.C-Delete: perl:matcher:last + URxvt.keysym.M-Delete: perl:matcher:list URxvt.matcher.button: 1 URxvt.matcher.pattern.1: \\bwww\\.[\\w-]+\\.[\\w./?&@#-]*[\\w/-] URxvt.matcher.pattern.2: \\B(/\\S+?):(\\d+)(?=:|$) @@ -395,6 +397,19 @@ window. Illustrates overwriting the refresh callbacks to create your own overlays or changes. +=item confirm-paste + +Displays a confirmation dialog when a paste containing at least a full +line is detected. + +=item bell-command + +Runs the command specified by the C resource when +a bell event occurs. For example, the following pops up a notification +bubble with the text "Beep, Beep" using notify-send: + + URxvt.bell-command: notify-send "Beep, Beep" + =back =head1 API DOCUMENTATION @@ -438,7 +453,7 @@ =head2 Extension Objects Every perl extension is a perl class. A separate perl object is created -for each terminal, and each terminal has its own set of extenion objects, +for each terminal, and each terminal has its own set of extension objects, which are passed as the first parameter to hooks. So extensions can use their C<$self> object without having to think about clashes with other extensions or other terminals, with the exception of methods and members @@ -612,6 +627,13 @@ Called whenever some data is written to the tty/pty and can be used to suppress or filter tty input. +=item on_tt_paste $term, $octets + +Called whenever text is about to be pasted, with the text as argument. You +can filter/change and paste the text yourself by returning a true value +and calling C<< $term->tt_paste >> yourself. C<$octets> is +locale-encoded. + =item on_line_update $term, $row Called whenever a line was updated or changed. Can be used to filter @@ -646,7 +668,7 @@ The event is simply the action string. This interface is assumed to change slightly in the future. -=item on_resize_all_windows $tern, $new_width, $new_height +=item on_resize_all_windows $term, $new_width, $new_height Called just after the new window size has been calculated, but before windows are actually being resized or hints are being set. If this hook @@ -788,13 +810,14 @@ =item urxvt::fatal $errormessage -Fatally aborts execution with the given error message. Avoid at all -costs! The only time this is acceptable is when the terminal process -starts up. +Fatally aborts execution with the given error message (which should +include a trailing newline). Avoid at all costs! The only time this +is acceptable (and useful) is in the init hook, where it prevents the +terminal from starting up. =item urxvt::warn $string -Calls C with the given string which should not include a +Calls C with the given string which should include a trailing newline. The module also overwrites the C builtin with a function that calls this function. @@ -808,7 +831,7 @@ Returns all urxvt::term objects that exist in this process, regardless of whether they are started, being destroyed etc., so be careful. Only term objects that have perl extensions attached will be returned (because there -is no urxvt::term objet associated with others). +is no urxvt::term object associated with others). =item $time = urxvt::NOW @@ -861,7 +884,8 @@ Return the rendition mask used for overlays by default. -=item $rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline +=item $rendbit = urxvt::RS_Bold, urxvt::RS_Italic, urxvt::RS_Blink, +urxvt::RS_RVid, urxvt::RS_Uline Return the bit that enabled bold, italic, blink, reverse-video and underline, respectively. To enable such a style, just logically OR it into @@ -1195,6 +1219,7 @@ $_[0][1]->stop; } +# only needed for AnyEvent < 6 compatibility sub one_event { Carp::croak "AnyEvent->one_event blocking wait unsupported in urxvt, use a non-blocking API"; } @@ -1296,12 +1321,13 @@ Here is a likely non-exhaustive list of option names, please see the source file F to see the actual list: - borderLess console cursorBlink cursorUnderline hold iconic insecure - intensityStyles jumpScroll loginShell mapAlert meta8 mouseWheelScrollPage - override-redirect pastableTabs pointerBlank reverseVideo scrollBar - scrollBar_floating scrollBar_right scrollTtyKeypress scrollTtyOutput - scrollWithBuffer secondaryScreen secondaryScroll skipBuiltinGlyphs - transparent tripleclickwords utmpInhibit visualBell + borderLess buffered console cursorBlink cursorUnderline hold iconic + insecure intensityStyles iso14755 iso14755_52 jumpScroll loginShell + mapAlert meta8 mouseWheelScrollPage override_redirect pastableTabs + pointerBlank reverseVideo scrollBar scrollBar_floating scrollBar_right + scrollTtyKeypress scrollTtyOutput scrollWithBuffer secondaryScreen + secondaryScroll skipBuiltinGlyphs skipScroll transparent tripleclickwords + urgentOnBell utmpInhibit visualBell =item $value = $term->resource ($name[, $newval]) @@ -1324,19 +1350,20 @@ are supported in every build, please see the source file F to see the actual list: - answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont - borderLess chdir color cursorBlink cursorUnderline cutchars delete_key - display_name embed ext_bwidth fade font geometry hold iconName - imFont imLocale inputMethod insecure int_bwidth intensityStyles - italicFont jumpScroll lineSpace letterSpace loginShell mapAlert meta8 - modifier mouseWheelScrollPage name override_redirect pastableTabs path - perl_eval perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay + answerbackstring backgroundPixmap backspace_key blendtype blurradius + boldFont boldItalicFont borderLess buffered chdir color cursorBlink + cursorUnderline cutchars delete_key depth display_name embed ext_bwidth + fade font geometry hold iconName iconfile imFont imLocale inputMethod + insecure int_bwidth intensityStyles iso14755 iso14755_52 italicFont + jumpScroll letterSpace lineSpace loginShell mapAlert meta8 modifier + mouseWheelScrollPage name override_redirect pastableTabs path perl_eval + perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput scrollWithBuffer scrollstyle - secondaryScreen secondaryScroll shade term_name title - transient_for transparent transparent_all tripleclickwords utmpInhibit - visualBell + secondaryScreen secondaryScroll shade skipBuiltinGlyphs skipScroll + term_name title transient_for transparent tripleclickwords urgentOnBell + utmpInhibit visualBell =cut @@ -1547,10 +1574,16 @@ =item $term->tt_write ($octets) -Write the octets given in C<$data> to the tty (i.e. as program input). To +Write the octets given in C<$octets> to the tty (i.e. as program input). To pass characters instead of octets, you should convert your strings first to the locale-specific encoding using C<< $term->locale_encode >>. +=item $term->tt_paste ($octets) + +Write the octets given in C<$octets> to the tty as a paste, converting NL to +CR and bracketing the data with control sequences if bracketed paste mode +is set. + =item $old_events = $term->pty_ev_events ([$new_events]) Replaces the event mask of the pty watcher by the given event mask. Can @@ -2233,7 +2266,7 @@ =head1 AUTHOR - Marc Lehmann + Marc Lehmann http://software.schmorp.de/pkg/rxvt-unicode =cut